|
[jQuery] IE bookmarklet problems: msg#01155lang.javascript.jquery
Has anyone run into issues using trying to insert jQuery into a page via js/bookmarklet after the page has loaded? Thanks, Chad ---- Bookmarket code var d=document; var a=function(o){document.getElementsByTagName('head').item(0).appendChild(o)}; q=d.createElement('script'); q.type='text/javascript'; q.src='http://jquery.com/src/jquery-latest.js'; a(q); --- Failing here // If IE is used, use the excellent hack by Matthias Miller // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_r evisited } else if ( jQuery.browser.msie ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=//:><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState != "complete" ) return; this.parentNode.removeChild( this ); jQuery.ready(); }; // Clear from memory script = null; // If Safari is used }
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [jQuery] The index of an element with Event, BoOz |
|---|---|
| Next by Date: | Re: [jQuery] The index of an element with Event, Sam Collett |
| Previous by Thread: | [jQuery] The index of an element with Event, BoOz |
| Next by Thread: | [jQuery] $.ajax API change 1.0.2?, Steven Wittens |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |