X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=jquery.openx.js;h=5029248deace1695ce6aff2db2e03865293417ef;hb=1a5c6ae43875f7a234fae919f9fd85b9574c3d8c;hp=3ccdb39f9444f1ba5012c9e914668dcb81c4d06c;hpb=17a2f5b7816379f69363ccb9e3c421eecedbea7a;p=openx diff --git a/jquery.openx.js b/jquery.openx.js index 3ccdb39..5029248 100644 --- a/jquery.openx.js +++ b/jquery.openx.js @@ -31,7 +31,8 @@ slots = {}, min_width = {}, max_width = {}, - width, + is_pagewidth = {}, + pagewidth, rendered = {}, visible = {}, rendering = false, @@ -100,9 +101,11 @@ * should display ad-banners. DEFAULT: ".oa". * See: http://api.jquery.com/category/selectors/ * min_prefix: string Prefix for the encoding of the minmal width as - * CSS-classname. DEFAULT: "min_". + * CSS-class. DEFAULT: "min_". * max_prefix: string Prefix for the encoding of the maximal width as - * CSS-classname. DEFAULT: "max_". + * CSS-class. DEFAULT: "max_". + * pw_marker: string CSS-class, that marks the encoded maximal and minmal + * width as page width. DEFAULT: "pw". * resize_delay: number Number of milliseconds to wait, before a * recalculation of the visible ads is scheduled. * If the value is choosen to small, a recalculation @@ -142,6 +145,7 @@ 'selector': '.oa', 'min_prefix': 'min_', 'max_prefix': 'max_', + 'pw_marker': 'pw', 'resize_delay': 200, 'debug': false }, @@ -192,22 +196,25 @@ slots[id] = this; min_width[id] = 0; max_width[id] = Number.MAX_VALUE; + is_pagewidth[id] = false; classes = this.className.split(/\s+/); for (i=0; i= min_width[id] && width <= max_width[id]; if (visible[id]) { if (!rendered[id]) { @@ -297,7 +308,7 @@ src += "&source=" + escape(OA_source); /** Signal, that this task is done / in progress */ - width = undefined; + pagewidth = undefined; /** Fetch data from OpenX and schedule the render-preparation */ $.getScript(src, init_ads); @@ -396,7 +407,7 @@ console.debug('Recalculation of visible banners done!'); /** Restart rendering, if new task was queued */ - if (width) + if (pagewidth) fetch_ads(); }