views:

526

answers:

1

Hi all, I'm using PrettyPhoto on a site I'm building, but for some reason the google adsense code is killing it in IE, there's no js errors, but the prettyphoto frame doesnt load and the links open up in the main window instead, however if I remove the google adsense code, PrettyPhoto works fine.. Has anyone else come across this, or something similar? This only seems to die in IE, although I've only checked chrome and FF.. (but assuming it works fine in the other browsers)

Here's the code btw:

Google:

<script type="text/javascript" language="javascript">
    google_ad_client = "pub-8487967187298044";
    google_ad_slot = "1088799521";
    google_ad_width = 250;
    google_ad_height = 250;
</script>
<script type="text/javascript" language="javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;&lt;/script&gt;

PrettyPhoto:

<script type="text/javascript" language="javascript">
$(document).ready(function(){
    $("a[rel^='prettyPhoto']").prettyPhoto({
     animationSpeed: 'fast', /* fast/slow/normal */
     padding: 0, /* padding for each side of the picture */
     opacity: 0.35, /* Value betwee 0 and 1 */
     showTitle: false, /* true/false */
     allowresize: false, /* true/false */
     counter_separator_label: ' / ', /* The separator for the gallery counter 1 "of" 2 */
     theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
     callback: function(){}
    });
});
</script>

PrettyPhoto Link example:

<a href="/fanzone-games?game=1&amp;iframe=true&amp;height=420&amp;width=720" rel="prettyPhoto[games2]" class="red"><strong>Play Now [+]</strong></a>
A: 

Do you have an example page or code we can look at?

[Edit after looking at the website]

Have you tried placing the Google code at the very bottom of the page? Trivial, but i'm curious.

IllusivePro
This should be a comment mate.
Shoban
Sure do.. http://www.sportsneo.com/fan-zone - the site is still under construction, but that's the page with the google sense on it, the prettyphoto is the same code as http://www.sportsneo.com/home (which doesn't have adsense) :)
SoulieBaby
Apologies, I can't comment yet. Don't have enough reputation.
IllusivePro
hmmm wouldn't that change where the google ad is displayed?
SoulieBaby
Sorry yes it would. I was thinking of Analytics there not Adsense.
IllusivePro
will try it anyway and let you know.. lol
SoulieBaby
Well tried it anyway and still no go.. so I've put it back to where it was..
SoulieBaby
What is the URL of this site? I'm sure if we can look at the live site we can solve this.
scunliffe
The page is http://www.sportsneo.com/fan-zone I did a search for jQuery and Google AdSense and I'm now trying to make the google code load within the document ready function, but am having issues with it.. lol but that might be the problem, that google adsense is loading before the jquery stuff does....
SoulieBaby