# A 3rd party has messed up my jQuery show hide slide

**URL:** <https://forum.kirupa.com/t/a-3rd-party-has-messed-up-my-jquery-show-hide-slide/281748>\
**Category:** web dev\
**Created:** [February 12, 2009, 9:33pm UTC](https://forum.kirupa.com/t/a-3rd-party-has-messed-up-my-jquery-show-hide-slide/281748 "2009-02-12T21:33:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![somnamblst](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@somnamblst](https://forum.kirupa.com/u/somnamblst)\
**Post date:** [February 12, 2009, 9:33pm UTC](https://forum.kirupa.com/t/a-3rd-party-has-messed-up-my-jquery-show-hide-slide/281748/1 "2009-02-12T21:33:40Z")

</div>

I implemented a rather elegant in it’s simplicity show hide slide that my company has been using for awhile. Enter 3rd party technology company that works on solutions for the parent company. They are implementing something they call Lazy Loading & have broken the jQuery slide, but only in IE not FF.

In an email one of the 3rd party developers outlined why he thought the slide doesn’t happen in IE. Except he was wrong. After upgrading to the 53k jquery [FONT=&quot]1.3.1-min the slide is still broken in IE.

This is what he wrote regarding why he thought jquery 1.3.1 would fix what he broke.

[/FONT] _"One issue I am seeing with the LazyLoading is with the JQuery bindReady()_  
_event in Internet Explorer. Essentially, you’re never going to slide the_

- down in IE. The version of Jquery currently in use uses a neat\*  
_little hack to trigger an onload event in IE:_

- // 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 does not exist if jQuery is loaded dynamically\*  
_if ( script )_  
_script.onreadystatechange = function() {_  
_if ( this.readyState != “complete” ) return;_  
_jQuery.ready();_  
_};_

_The comment about it only working if you document.write() it kind of sums_  
_up our problem. Since we’ve overridden document.write() to load the file_  
_the readystate of the script never changes._

_Newer versions of jQuery use the availability of the ScrollBar to detect_  
_whether the page is loaded. Perhaps that could be patched into this_  
_version? If not, the code jQuery uses to handle Safari’s onload event_  
_looks like it would work but I have not tested."_
