Does Not Work Window.onload In Ie8
I have a pretty simple image switcher, which I use for manual images switcher and for carousel. In IE 8 it works strange. In carousel scenario image switches just once, thereafter
Solution 1:
Accessing console
in FF without Firebug open or in IE will result in an error that will block the rest of your JS from executing. If you want to leave calls to console
in, you should implement them like one of the following:
try { console.log('blah'); } catch(e) {}
// orif (typeofconsole != 'undefined') console.log('blah');
Or use a custom built logging function that implements something like the above.
Solution 2:
The cause was non-functional window.onload in IE8. I did right trick but made stupid mistake. So, I fixed it:
was
<!--[if IE 8 ]>
<script defer src="ie_onload.js"></script>
<![endif]-->
is now
<!--[if IE 8 ]>
<script defer src="{{ MEDIA_URL }}js/ie_onload.js"></script>
<![endif]-->
in ie_onload.js
document.body.onload = function() {
imageViewer();
// and other functions
};
Post a Comment for "Does Not Work Window.onload In Ie8"