TI'm injecting jQuery into any webpage (via a bookmarklet). This works fine, but for some strange reason $(window).bind("resize") doesn't work with IE. No errors, just doesn't fire the event.
To see this, execute this code while on any webpage (using Firebug Javascript Console): //load jQuery var js = document.createElement('script'); js.type = "text/javascript"; js.src = "http://localhost/js/jquery-1.3.js"; document.body.appendChild(js); //this is strange: $ is undefined until a setTimeout. //even stranger: setTimeout must be at least 50 (for me) setTimeout(function(){ //change all link colors to random. var r = function(){ var hex = Math.floor(Math.random()*255*255*255).toString(16); while (hex.length<6) hex = "0" + hex; hex = "#" + hex; $("a").css("color", hex); }; //bind it. resize wont work in IE. $(window).bind("resize", r); $(window).bind("scroll", r); r(); }, 50); On Jan 13, 9:32 pm, Dave Methvin <dave.meth...@gmail.com> wrote: > Do you have a simple test case? Resize works for me in IE.