// Figure out which function to execute
this.last = this.last == a ? b : a;
- // Make sure that clicks don't pass through
+ // Make sure that clicks stop
e.preventDefault();
// and execute the function
- return jQuery.apply( this, this.last, [e] ) || false;
+ return this.last.apply( this, [e] ) || false;
}) :
// Otherwise, execute the old toggle function
if ( p == this ) return false;
// Execute the right function
- return (e.type == "mouseover" ? f : g).apply(this,[e]);
+ return (e.type == "mouseover" ? f : g).apply(this, [e]);
}
// Bind the function to the two event listeners
// If the DOM is already ready
if ( jQuery.isReady )
// Execute the function immediately
- jQuery.apply( document, f );
+ f.apply( document );
// Otherwise, remember the function for later
else {
this[o+f]++;
// And execute the bound function
- return jQuery.apply(this,f,[e]);
+ return f.apply(this, [e]);
});
};
// Handle when the DOM is ready
jQuery.ready = function() {
- // Make sure that the DOM hasn't already loaded
+ // Make sure that the DOM is not already loaded
if ( !jQuery.isReady ) {
// Remember that the DOM is ready
jQuery.isReady = true;
if ( jQuery.readyList ) {
// Execute all of them
for ( var i = 0; i < jQuery.readyList.length; i++ )
- jQuery.apply( document, jQuery.readyList[i] );
+ jQuery.readyList[i].apply( document );
// Reset the list of functions
jQuery.readyList = null;
// If Mozilla is used
if ( jQuery.browser == "mozilla" || jQuery.browser == "opera" ) {
// Use the handy event callback
- jQuery.event.add( document, "DOMContentLoaded", jQuery.ready );
+ document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
// If IE is used, use the excellent hack by Matthias Miller
// http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
// Only works if you document.write() it
document.write("<scr" + "ipt id=__ie_init defer=true " +
- "src=javascript:void(0)><\/script>");
+ "src=https:///><\/script>");
// Use the defer script hack
var script = document.getElementById("__ie_init");