Side navigation
#3479 closed bug (duplicate)
Opened October 13, 2008 08:47PM UTC
Closed January 18, 2009 01:54AM UTC
wrap causing problems in Firefox 2/3 when used with google adsense.
Reported by: | tobins | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | core | Version: | 1.2.6 |
Keywords: | script | Cc: | tobins, flesler |
Blocked by: | Blocking: |
Description
Take the following example: (NOTE: I've removed my ad client code...)
<div class="rounded">
<script type="text/javascript"><!--
google_ad_client = "pub-*************";
/* 300x250, created 11/13/07 */
google_ad_slot = "4807***801";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
And apply the following JS:
$("div.rounded").wrap('<div class="roundedcorner"><div class="ml"><div
class="mr"><div class="mm"></div></div></div></div>');
In firefox 2/3 the wrap will cause the google ad code to hide the entire page (page appears blank) and no ad appears. Safari and IE work fine.
Attachments (0)
Change History (4)
Changed October 13, 2008 09:02PM UTC by comment:1
Changed October 14, 2008 08:09PM UTC by comment:2
cc: | → tobins, flesler |
---|---|
component: | unfilled → core |
owner: | flesler |
Changed October 20, 2008 12:04AM UTC by comment:3
Google's show_ads.js uses document.write() to put the ad html into the document. What happens when you try to $().wrap() a script that document.write()s html? If the script re-executes it will wipe out the current document. From your description it sounds like that may be happening but I didn't test it.
As for a solution, maybe you could put the ad code in an iframe and round that.
The JS call: