I\'ve recently installed IE 8 and can\'t seem to get the jquery $(document).ready event to fire. Are there any special considerations that I\'m missing? Litterally, this i
$(document).ready()
Not work in IE8 I find a code sample from this link https://plainjs.com/javascript/events/running-code-when-the-document-is-ready-15/ It is working with Jquery 1.10.2
function run() {
// do something
alert('working');
}
// in case the document is already rendered
if (document.readyState!='loading') run();
// modern browsers
else if (document.addEventListener) document.addEventListener('DOMContentLoaded', run);
// IE <= 8
else document.attachEvent('onreadystatechange', function(){
if (document.readyState=='complete') run();
});