Opened 14 years ago
Closed 14 years ago
#3479 closed bug (duplicate)
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.
Change History (4)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Cc: | tobins flesler added |
---|---|
Component: | unfilled → core |
Owner: | flesler deleted |
comment:3 Changed 14 years ago by
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.
comment:4 Changed 14 years ago by
Keywords: | script added |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Duplicate of #3105
The JS call: