| 435 | | // If IE is used, use the excellent hack by Matthias Miller |
| 436 | | // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited |
| 437 | | else if ( jQuery.browser.msie ) { |
| 438 | | |
| 439 | | // Only works if you document.write() it |
| 440 | | document.write("<scr" + "ipt id=__ie_init defer=true " + |
| 441 | | "src=//:><\/script>"); |
| 442 | | |
| 443 | | // Use the defer script hack |
| 444 | | var script = document.getElementById("__ie_init"); |
| 445 | | |
| 446 | | // script does not exist if jQuery is loaded dynamically |
| 447 | | if ( script ) |
| 448 | | script.onreadystatechange = function() { |
| 449 | | if ( this.readyState != "complete" ) return; |
| 450 | | jQuery.ready(); |
| 451 | | }; |
| 452 | | |
| 453 | | // Clear from memory |
| 454 | | script = null; |
| 455 | | |
| 456 | | // If Safari is used |
| 457 | | } else if ( jQuery.browser.safari ) |
| 458 | | // Continually check to see if the document.readyState is valid |
| 459 | | jQuery.safariTimer = setInterval(function(){ |
| 460 | | // loaded and complete are both valid states |
| 461 | | if ( document.readyState == "loaded" || |
| 462 | | document.readyState == "complete" ) { |
| 463 | | |
| 464 | | // If either one are found, remove the timer |
| 465 | | clearInterval( jQuery.safariTimer ); |
| 466 | | jQuery.safariTimer = null; |
| | 431 | // If Safari or IE is used |
| | 432 | else |
| | 433 | // Continually check to see if the document is ready |
| | 434 | (function timer() { |
| | 435 | try { |
| | 436 | // If IE is used, use the excellent hack by Hedger Wang and Andrea Giammarchi |
| | 437 | // http://www.3site.eu/jstests/onContent/DOMReadyAnddoScroll.php |
| | 438 | if ( jQuery.browser.msie || document.readyState != "loaded" && document.readyState != "complete" ) |
| | 439 | document.firstChild.doScroll("left"); |