IE not work :(

25 messages Options
Embed this post
Permalink
1 2
catasoft

Re: IE not work :(

Reply Threaded More More options
Print post
Permalink
Hey guys

I tries all solutions here but non were working.

In the end i got into the sources of shadowbox and i noticed that the markup was not inserted in the DOM at the right moment, so the instruction "U.get('sb-container').style.display = 'block';" was failing (since sb-container was inexistant) and DOM Ready was not called right.

So i decided to switch to some other library, thinking that the ready event has got to do with the JS library used.

SOLUTION:
-->i replaced prototype.js with jquery.js.
-->i replaced document.observe with window.onload
-->IT WORKS in IE8, FF
Of course, not all of you can change so easily the JS library you use, since there may be other dependencies to consider.

Hope this helps,

Cata
Rioz

Re: IE not work :(

Reply Threaded More More options
Print post
Permalink
Hi Catasoft,

Re your solution, point 2:

===========

SOLUTION:
-->i replaced prototype.js with jquery.js.
-->i replaced document.observe with window.onload -----> What do you mean by this?? Where??

===========

Thank you for your tip

catasoft

Re: IE not work :(

Reply Threaded More More options
Print post
Permalink
Hey Rioz
I forgot to mention: i was using shadowbox in a site that opened automatically a popup upon page load.
So with prototype i was catching this event using document.observe, instead this didn't exist in jquery, so i just used window.onload = function() {...}.
Hope this helps,
Cata
Rioz

Re: IE not work :(

Reply Threaded More More options
Print post
Permalink
So, you saying is that all i need is to replace prototype.js file with jquery.js file?? Is that all i need to do??

Many thanks in advance
catasoft

Re: IE not work :(

Reply Threaded More More options
Print post
Permalink
Yes, you can try.
Because Shadowbox automatically detects the JS Framework you're using, and will detect jQuery instead of Prototype. But you've got to test... it worked for me :) let us know of your results.
-C
1 2