Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 1.0

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 build
Octocat-spinner-32 dist
Octocat-spinner-32 examples
Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 META.json
Octocat-spinner-32 Makefile
Octocat-spinner-32 screenshot.png
Octocat-spinner-32 version.txt

jQuery OpenX tag plugin

This plugin provides alternative jQuery-compatible way to insert OpenX ad invocation tags into various parts of your web page. It also features some additional improvements over standard OpenX tags:

  • Ads are inserted asynchronously so that ad invocation code does not block page loading.
  • You can set and override invocation tag parameters in several places: globally for all ads that are loaded using the plugin, in ad insertion JS call, in ad placeholder class attribute with the help of jQuery Metadata plugin.
  • Callback on ad load.

The plugin was successfully tested with OpenX Community Edition version 2.8.8-rc6 (the most recent at the moment).

Usage examples

Init OpenX tag plugin with required parameters:

$.openxtag('init', {
    delivery: 'http://openx.local/openx-now/www/delivery',
    deliverySSL: 'https://openx.local/openx-now/www/delivery'

Load ad from OpenX zone 1 into web page element with id "zone1":

$('#zone1').openxtag('zone', 1);

Load ads from OpenX zone 1 into all elements with "banner" class with "block" option that instructs OpenX to skip banners that were already loaded on current page. The function from third argument is called on ad load.

$('.banner').openxtag('zone', 1, {
    block: true
}, function () {
    console.log('loaded ad from zone ' + 1);

Load all ads using invocation parameters set for each placeholder element in their HTML code.

$('.banner').openxtag('zone', function () {
    console.log('loaded ad');
<div class="banner {zoneID: 1, source: 'zone1'}"></div>
<div class="banner {zoneID: 1, source: 'zone2'}"></div>

Also see sample HTML pages in examples/


  • add test suite
  • remove callback, add event on ad load
Something went wrong with that request. Please try again.