I am stumped… I\’m building a responsive site that loads a large an graphic only on larger screens. It works great in IE9/FF/Chrome, but it doesn\’t function in IE8.
Am anyone see what is making IE8 not fire? Here is my code:
<script type=\"text/javascript\">
$(document).ready(function() {
$(window).resize(function() {
//small-screen
if (window.innerWidth < 768) {$(\'#smiling-model\').html(\'\');}
//end small-screen
else if (window.innerWidth >= 768) {
$(\'#smiling-model:empty\').append(\'<img id=\"#smiling-model-img\" src=\"images/smiling-model-500x456px.jpg\" alt=\"Great Smile\" />\');
}
}).resize(); // trigger resize event
});
</script>
Here is the link to the actual site: http://www.orlickdental.com/
Thanks all!
Omar





Rating:
The post internet explorer 8 – jQuery resize() Not Working in IE8 appeared first on Javascript ASK.
via Javascript ASK http://javascriptask.phpfogapp.com/internet-explorer-8-jquery-resize-not-working-in-ie8.html
No comments:
Post a Comment