rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
return this.each(function(){$.event.remove(this,t,f);}); | return this.each(function(){$.event.trigger(this,t);}); | return this.each(function(){$.event.remove(this,t,f);}); |
$.get('index.html', function(content) { var div = $(document.createElement('div')).html(content) .find('[@id=main]').html(); $('#main').html(div); | synchronize(function() { blocking = true; $.get(files[num],function(js){ js = js.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&"); try { eval(js); } catch(e) { if(typeof console != "undefined") console.error(e); Test.push( [ false, "Died on test #" + (Test.length+1) + ": " + e ] ); } var good = 0, bad = 0; var ol = document.createElement("ol"); var li = "", state = "pass"; for ( var i = 0; i < Test.length; i++ ) { var li = document.createElement("li"); li.className = Test[i][0] ? "pass" : "fail"; li.innerHTML = Test[i][1]; ol.appendChild( li ); if ( !Test[i][0] ) { state = "fail"; bad++; } else good++; } var li = document.createElement("li"); li.className = state; var b = document.createElement("b"); b.innerHTML = files[num] + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + Test.length + ")</b>"; b.onclick = function(){ var n = this.nextSibling; if ( jQuery.css( n, "display" ) == "none" ) n.style.display = "block"; else n.style.display = "none"; }; li.appendChild( b ); li.appendChild( ol ); document.getElementById("tests").appendChild( li ); Test = []; reset(); | $.get('index.html', function(content) { var div = $(document.createElement('div')).html(content) // search for main div .find('[@id=main]').html(); $('#main').html(div); blocking = false; process(); }); |
}); | $.get('index.html', function(content) { var div = $(document.createElement('div')).html(content) // search for main div .find('[@id=main]').html(); $('#main').html(div); blocking = false; process(); }); |
|
var i = 0; | this.curAnim = prop; | return this.queue(function(){ var i = 0; for ( var p in prop ) { var e = new jQuery.fx( this, jQuery.speed(speed,callback,i++), p ); if ( prop[p].constructor == Number ) e.custom( e.cur(), prop[p] ); else e[ prop[p] ]( prop ); } }); |
var e = new jQuery.fx( this, jQuery.speed(speed,callback,i++), p ); | var e = new jQuery.fx( this, jQuery.speed(speed,callback), p ); | return this.queue(function(){ var i = 0; for ( var p in prop ) { var e = new jQuery.fx( this, jQuery.speed(speed,callback,i++), p ); if ( prop[p].constructor == Number ) e.custom( e.cur(), prop[p] ); else e[ prop[p] ]( prop ); } }); |
var e = ["blur","focus","contextmenu","load","resize","scroll","unload", "click","dblclick","mousedown","mouseup","mouseenter","mouseleave", "mousemove","mouseover","mouseout","change","reset","select","submit", "keydown","keypress","keyup","abort","error","ready"]; | var e = "blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup,abort,error,ready".split(","); | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ["blur","focus","contextmenu","load","resize","scroll","unload", "click","dblclick","mousedown","mouseup","mouseenter","mouseleave", "mousemove","mouseover","mouseout","change","reset","select","submit", "keydown","keypress","keyup","abort","error","ready"]; // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding $.fn[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding $.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering $.fn["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once $.fn["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return $.apply(this,f,[e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ $.isReady = false; $.readyList = []; // Handle when the DOM is ready $.ready = function() { // Make sure that the DOM hasn't already loaded if ( !$.isReady ) { // Remember that the DOM is ready $.isReady = true; // If there are functions bound, to execute if ( $.readyList ) { // Execute all of them for ( var i = 0; i < $.readyList.length; i++ ) $.apply( document, $.readyList[i] ); // Reset the list of functions $.readyList = null; } } }; // If Mozilla is used if ( $.browser == "mozilla" || $.browser == "opera" ) { // Use the handy event callback $.event.add( document, "DOMContentLoaded", $.ready ); // If IE is used, use the excellent hack by Matthias Miller // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited } else if ( $.browser == "msie" ) { // Only works if you document.write() it document.write('<scr' + 'ipt id=__ie_init defer=true ' + 'src=javascript:void(0)><\/script>'); // Use the defer script hack var script = document.getElementById('__ie_init'); script.onreadystatechange = function() { if ( this.readyState == 'complete' ) $.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( $.browser == "safari" ) { // Continually check to see if the document.readyState is valid $.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( $.safariTimer ); $.safariTimer = null; // and execute any waiting functions $.ready(); } }, 10); } // A fallback to window.onload, that will always work $.event.add( window, "load", $.ready ); })(); |
document.write('<scr' + 'ipt id=__ie_init defer=true ' + 'src=javascript:void(0)><\/script>'); | document.write("<scr" + "ipt id=__ie_init defer=true " + "src=javascript:void(0)><\/script>"); | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ["blur","focus","contextmenu","load","resize","scroll","unload", "click","dblclick","mousedown","mouseup","mouseenter","mouseleave", "mousemove","mouseover","mouseout","change","reset","select","submit", "keydown","keypress","keyup","abort","error","ready"]; // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding $.fn[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding $.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering $.fn["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once $.fn["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return $.apply(this,f,[e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ $.isReady = false; $.readyList = []; // Handle when the DOM is ready $.ready = function() { // Make sure that the DOM hasn't already loaded if ( !$.isReady ) { // Remember that the DOM is ready $.isReady = true; // If there are functions bound, to execute if ( $.readyList ) { // Execute all of them for ( var i = 0; i < $.readyList.length; i++ ) $.apply( document, $.readyList[i] ); // Reset the list of functions $.readyList = null; } } }; // If Mozilla is used if ( $.browser == "mozilla" || $.browser == "opera" ) { // Use the handy event callback $.event.add( document, "DOMContentLoaded", $.ready ); // If IE is used, use the excellent hack by Matthias Miller // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited } else if ( $.browser == "msie" ) { // Only works if you document.write() it document.write('<scr' + 'ipt id=__ie_init defer=true ' + 'src=javascript:void(0)><\/script>'); // Use the defer script hack var script = document.getElementById('__ie_init'); script.onreadystatechange = function() { if ( this.readyState == 'complete' ) $.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( $.browser == "safari" ) { // Continually check to see if the document.readyState is valid $.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( $.safariTimer ); $.safariTimer = null; // and execute any waiting functions $.ready(); } }, 10); } // A fallback to window.onload, that will always work $.event.add( window, "load", $.ready ); })(); |
var script = document.getElementById('__ie_init'); | var script = document.getElementById("__ie_init"); | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ["blur","focus","contextmenu","load","resize","scroll","unload", "click","dblclick","mousedown","mouseup","mouseenter","mouseleave", "mousemove","mouseover","mouseout","change","reset","select","submit", "keydown","keypress","keyup","abort","error","ready"]; // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding $.fn[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding $.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering $.fn["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once $.fn["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return $.apply(this,f,[e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ $.isReady = false; $.readyList = []; // Handle when the DOM is ready $.ready = function() { // Make sure that the DOM hasn't already loaded if ( !$.isReady ) { // Remember that the DOM is ready $.isReady = true; // If there are functions bound, to execute if ( $.readyList ) { // Execute all of them for ( var i = 0; i < $.readyList.length; i++ ) $.apply( document, $.readyList[i] ); // Reset the list of functions $.readyList = null; } } }; // If Mozilla is used if ( $.browser == "mozilla" || $.browser == "opera" ) { // Use the handy event callback $.event.add( document, "DOMContentLoaded", $.ready ); // If IE is used, use the excellent hack by Matthias Miller // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited } else if ( $.browser == "msie" ) { // Only works if you document.write() it document.write('<scr' + 'ipt id=__ie_init defer=true ' + 'src=javascript:void(0)><\/script>'); // Use the defer script hack var script = document.getElementById('__ie_init'); script.onreadystatechange = function() { if ( this.readyState == 'complete' ) $.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( $.browser == "safari" ) { // Continually check to see if the document.readyState is valid $.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( $.safariTimer ); $.safariTimer = null; // and execute any waiting functions $.ready(); } }, 10); } // A fallback to window.onload, that will always work $.event.add( window, "load", $.ready ); })(); |
if ( this.readyState == 'complete' ) | if ( this.readyState == "complete" ) | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ["blur","focus","contextmenu","load","resize","scroll","unload", "click","dblclick","mousedown","mouseup","mouseenter","mouseleave", "mousemove","mouseover","mouseout","change","reset","select","submit", "keydown","keypress","keyup","abort","error","ready"]; // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding $.fn[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding $.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering $.fn["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once $.fn["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return $.apply(this,f,[e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ $.isReady = false; $.readyList = []; // Handle when the DOM is ready $.ready = function() { // Make sure that the DOM hasn't already loaded if ( !$.isReady ) { // Remember that the DOM is ready $.isReady = true; // If there are functions bound, to execute if ( $.readyList ) { // Execute all of them for ( var i = 0; i < $.readyList.length; i++ ) $.apply( document, $.readyList[i] ); // Reset the list of functions $.readyList = null; } } }; // If Mozilla is used if ( $.browser == "mozilla" || $.browser == "opera" ) { // Use the handy event callback $.event.add( document, "DOMContentLoaded", $.ready ); // If IE is used, use the excellent hack by Matthias Miller // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited } else if ( $.browser == "msie" ) { // Only works if you document.write() it document.write('<scr' + 'ipt id=__ie_init defer=true ' + 'src=javascript:void(0)><\/script>'); // Use the defer script hack var script = document.getElementById('__ie_init'); script.onreadystatechange = function() { if ( this.readyState == 'complete' ) $.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( $.browser == "safari" ) { // Continually check to see if the document.readyState is valid $.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( $.safariTimer ); $.safariTimer = null; // and execute any waiting functions $.ready(); } }, 10); } // A fallback to window.onload, that will always work $.event.add( window, "load", $.ready ); })(); |
jQuery.getScript( this.src, function() {} ); | jQuery.getScript( this.src ); | return this.find('script').each(function(){ if ( this.src ) // for some weird reason, it doesn't work if the callback is ommited jQuery.getScript( this.src, function() {} ); else eval.call( window, this.text || this.textContent || this.innerHTML || "" ); }).end(); |
jQuery.event.add( document, "DOMContentLoaded", jQuery.ready ); | document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM hasn't already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 ); // If IE is used, use the excellent hack by Matthias Miller // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; | while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.undo(); } catch (e) { SimileAjax.Debug.exception("History: Failed to undo action {" + action.label + "}"); } } | window.setTimeout(function() { while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.undo(); } catch (e) { SimileAjax.Debug.exception("History: Failed to undo action {" + action.label + "}"); } } SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); finishUp(); }, 0); |
var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.undo(); } catch (e) { SimileAjax.Debug.exception("History: Failed to undo action {" + action.label + "}"); } } SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); finishUp(); }, 0); | SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); finishUp(); }, 0); | window.setTimeout(function() { while (SimileAjax.History._currentIndex > c && SimileAjax.History._currentIndex > SimileAjax.History._baseIndex) { SimileAjax.History._currentIndex--; var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.undo(); } catch (e) { SimileAjax.Debug.exception("History: Failed to undo action {" + action.label + "}"); } } SimileAjax.History._listeners.fire("onAfterUndoSeveral", []); finishUp(); }, 0); |
if ( !this.queue ) this.queue = {}; if ( !this.queue[type] ) this.queue[type] = []; this.queue[type].push( fn ); | if ( !this.queue ) this.queue = {}; | return this.each(function(){ if ( !this.queue ) this.queue = {}; if ( !this.queue[type] ) this.queue[type] = []; this.queue[type].push( fn ); if ( this.queue[type].length == 1 ) fn.apply(this); }); |
if ( this.queue[type].length == 1 ) fn.apply(this); }); | if ( !this.queue[type] ) this.queue[type] = []; this.queue[type].push( fn ); if ( this.queue[type].length == 1 ) fn.apply(this); }); | return this.each(function(){ if ( !this.queue ) this.queue = {}; if ( !this.queue[type] ) this.queue[type] = []; this.queue[type].push( fn ); if ( this.queue[type].length == 1 ) fn.apply(this); }); |
alert("Caught exception: " + msg2 + "\n\nDetails: " + e2); | if (!SimileAjax.Debug.silent) { alert("Caught exception: " + msg2 + "\n\nDetails: " + e2); } | function(msg2, e2) { alert("Caught exception: " + msg2 + "\n\nDetails: " + e2); }; |
ok( $('#first').text() == 'ERROR', 'Check if content was injected into the DOM' ); | ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); | $('#first').load("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if content was injected into the DOM' ); start(); }); |
self.html(res.responseText).each( callback, [res.responseText, status] ); jQuery("script", self).each(function(){ if ( this.src ) jQuery.getScript( this.src ); else eval.call( window, this.text || this.textContent || this.innerHTML || "" ); }); | self.html(res.responseText) .evalScripts() .each( callback, [res.responseText, status] ); | jQuery.ajax( type, url, params,function(res, status){ if ( status == "success" || !ifModified && status == "notmodified" ) { // Inject the HTML into all the matched elements self.html(res.responseText).each( callback, [res.responseText, status] ); // Execute all the scripts inside of the newly-injected HTML jQuery("script", self).each(function(){ if ( this.src ) jQuery.getScript( this.src ); else eval.call( window, this.text || this.textContent || this.innerHTML || "" ); }); } else callback.apply( self, [res.responseText, status] ); }, ifModified); |
"src=https: | "src= | new function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select," + "submit,keydown,keypress,keyup,error").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // Attach the event listener return this.each(function(){ var count = 0; // Add the event jQuery.event.add( this, o, function(e){ // If this function has already been executed, stop if ( count++ ) return; // And execute the bound function return f.apply(this, [e]); }); }); }; } // If Mozilla is used if ( jQuery.browser.mozilla || jQuery.browser.opera ) { // Use the handy event callback 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 } else if ( jQuery.browser.msie ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser.safari ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); } |
$.apply( self, callback, [res.responseText] ); | callback.apply( self, [res.responseText] ); | self.html(res.responseText).each(function(){ // If a callback function was provided if ( callback && callback.constructor == Function ) // Execute it within the context of the element $.apply( self, callback, [res.responseText] ); }); |
$.xml( "POST", url, $.param(data), function(r) { if ( ret ) { ret( $.httpData(r,type) ); } }); | self.html(res.responseText).each(function(){ if ( callback && callback.constructor == Function ) $.apply( self, callback, [res.responseText] ); }); | $.xml( "POST", url, $.param(data), function(r) { if ( ret ) { ret( $.httpData(r,type) ); } }); |
return __method.apply(object, arguments); | return __method.apply(object, args.concat($A(arguments))); | return function() { return __method.apply(object, arguments); } |
z.timer=setInterval(function(){z.step(f,t);}, 13); | return a ? this.each(function(){ new fx.FadeSize(this,o).show(); }) : this._show(); | z.timer=setInterval(function(){z.step(f,t);}, 13); |
this.curAnim = prop; | this.curAnim = jQuery.extend({}, prop); | return this.queue(function(){ this.curAnim = prop; for ( var p in prop ) { var e = new jQuery.fx( this, jQuery.speed(speed,callback), p ); if ( prop[p].constructor == Number ) e.custom( e.cur(), prop[p] ); else e[ prop[p] ]( prop ); } }); |
return a ? this.queue(function(){ new $.fx.FadeSize(this,o).hide(); }) : this._hide(); | return this.each(function(){ if ( !this.queue ) this.queue = {}; if ( !this.queue[type] ) this.queue[type] = []; this.queue[type].push( fn ); if ( this.queue[type].length == 1 ) fn.apply(this); }); | return a ? this.queue(function(){ new $.fx.FadeSize(this,o).hide(); }) : this._hide(); |
function(e2) { alert("Caught exception: " + e2); | function(msg2, e2) { alert("Caught exception: " + msg2 + "\n\nDetails: " + e2); | function(e2) { alert("Caught exception: " + e2); }; |
"src=javascript:void(0)><\/script>"); | "src=https: | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM hasn't already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 ); // If IE is used, use the excellent hack by Matthias Miller // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=javascript:void(0)><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
if(typeof console != "undefined") { | if( console && console.error ) { | synchronize(function() { Test = []; try { callback(); } catch(e) { if(typeof console != "undefined") { console.error("Test " + name + " died, exception and test follows"); console.error(e); console.warn(callback.toString()); } Test.push( [ false, "Died on test #" + (Test.length+1) + ": " + e ] ); } }); |
$('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); }); | test("param", function() { expect(4); var params = {foo:"bar", baz:42, quux:"All your base are belong to us"}; ok( $.param(params) == "foo=bar&baz=42&quux=All%20your%20base%20are%20belong%20to%20us", "simple" ); params = {someName: [1, 2, 3], regularThing: "blah" }; ok( $.param(params) == "someName=1&someName=2&someName=3®ularThing=blah", "with array" ); params = {"foo[]":["baz", 42, "All your base are belong to us"]}; ok( $.param(params) == "foo[]=baz&foo[]=42&foo[]=All%20your%20base%20are%20belong%20to%20us", "more array" ); params = {"foo[bar]":"baz", "foo[beep]":42, "foo[quux]":"All your base are belong to us"}; ok( $.param(params) == "foo[bar]=baz&foo[beep]=42&foo[quux]=All%20your%20base%20are%20belong%20to%20us", "even more arrays" ); }); | $('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); }); |
setTimeout(function() { this.openLocation(); }, 0); | window.setTimeout(function() { gPrefService.savePrefFile(null); }, 1000); | setTimeout(function() { this.openLocation(); }, 0); |
this.mObservers = this.mObservers.filter( function (v) { return v != aObserver; } ); | cals.forEach(function (c) { if (mgr.getCalendarPref(c, this.mActivePref)) this.addCalendar(c); if (mgr.getCalendarPref(c, this.mDefaultPref)) this.setDefaultCalendar(c, false); }, this); | this.mObservers = this.mObservers.filter( function (v) { return v != aObserver; } ); |
else eval.call( window, this.text || this.textContent || this.innerHTML || "" ); | else { var data = this.text || this.textContent || this.innerHTML || ""; if (window.execScript) window.execScript( data ); else window.setTimeout( data, 0 ); } | return this.find('script').each(function(){ if ( this.src ) // for some weird reason, it doesn't work if the callback is ommited jQuery.getScript( this.src ); else eval.call( window, this.text || this.textContent || this.innerHTML || "" ); }).end(); |
this.each(function(){ if ( value == undefined ) for ( var prop in key ) jQuery.attr( type ? this.style : this, prop, key[prop] ); else jQuery.attr( type ? this.style : this, key, value ); }) : | this.each(function(i){ if ( this == obj ) pos = i; }); | this.each(function(){ // See if we're setting a hash of styles if ( value == undefined ) // Set all the styles for ( var prop in key ) jQuery.attr( type ? this.style : this, prop, key[prop] ); // See if we're setting a single key/value style else jQuery.attr( type ? this.style : this, key, value ); }) : |
self.html(res.responseText).each(function(){ if ( callback && callback.constructor == Function ) callback.apply( self, [res.responseText] ); }); | jQuery.ajax( type, url, params,function(res, status){ if ( status == "success" || !ifModified && status == "notmodified" ) { self.html(res.responseText).each( callback, [res.responseText, status] ); $("script", self).each(function(){ if ( this.src ) $.getScript( this.src ); else eval.call( window, this.text || this.textContent || this.innerHTML || "" ); }); } else callback.apply( self, [res.responseText, status] ); }, ifModified); | self.html(res.responseText).each(function(){ // If a callback function was provided if ( callback && callback.constructor == Function ) // Execute it within the context of the element callback.apply( self, [res.responseText] ); }); |
jQuery.eval ( this.text || this.textContent || this.innerHTML || "" ); | jQuery.globalEval( this.text || this.textContent || this.innerHTML || "" ); | return this.find('script').each(function(){ if ( this.src ) // for some weird reason, it doesn't work if the callback is ommited jQuery.getScript( this.src ); else { jQuery.eval ( this.text || this.textContent || this.innerHTML || "" ); } }).end(); |
setTimeout(function(aTabElt) { gBrowser.selectedTab = aTabElt; }, 0, gBrowser.addTab(url)); | setTimeout(function() { gURLBar.focus(); }, 0); | setTimeout(function(aTabElt) { gBrowser.selectedTab = aTabElt; }, 0, gBrowser.addTab(url)); |
(function(){ | new function(){ | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); | var e = ("blur,focus,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select," + "submit,keydown,keypress,keyup,error").split(","); | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
for ( var i = 0; i < e.length; i++ ) {(function(){ | for ( var i = 0; i < e.length; i++ ) new function(){ | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
jQuery.prototype[o] = function(f){ return this.bind(o, f); }; | jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; | jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
jQuery.prototype["one"+o] = function(f){ | jQuery.fn["one"+o] = function(f){ | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
if ( this[o+f] !== null ) return true; | if ( this[o+f] !== null ) return; | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
})();} jQuery.isReady = false; jQuery.readyList = []; jQuery.ready = function() { if ( !jQuery.isReady ) { jQuery.isReady = true; if ( jQuery.readyList ) { for ( var i = 0; i < jQuery.readyList.length; i++ ) jQuery.readyList[i].apply( document ); jQuery.readyList = null; } } }; | } | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
if ( jQuery.browser == "mozilla" || jQuery.browser == "opera" ) { | if ( jQuery.browser.mozilla || jQuery.browser.opera ) { | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
} else if ( jQuery.browser == "msie" ) { | } else if ( jQuery.browser.msie ) { | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
} else if ( jQuery.browser == "safari" ) { | } else if ( jQuery.browser.safari ) { | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
})(); | } | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; 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 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 } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
this.each(function(i){ if ( this == obj ) pos = i; }); | this.each(function(){ if ( value == undefined ) for ( var prop in key ) jQuery.attr( type ? this.style : this, prop, key[prop] ); else jQuery.attr( type ? this.style : this, key, value ); }) : | this.each(function(i){ if ( this == obj ) pos = i; }); |
var e = "blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + | var e = ("blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = "blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup,abort,error,ready".split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return jQuery.apply(this,f,[e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM hasn't already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; i++ ) jQuery.apply( document, jQuery.readyList[i] ); // 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 ); // If IE is used, use the excellent hack by Matthias Miller // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=javascript:void(0)><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
"change,reset,select,submit,keydown,keypress,keyup,abort,error,ready".split(","); | "change,reset,select,submit,keydown,keypress,keyup").split(","); | (function(){ /* * Bind a number of event-handling functions, dynamically */ var e = "blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + "change,reset,select,submit,keydown,keypress,keyup,abort,error,ready".split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return jQuery.apply(this,f,[e]); }); }; })();} /* * All the code that makes DOM Ready work nicely. */ jQuery.isReady = false; jQuery.readyList = []; // Handle when the DOM is ready jQuery.ready = function() { // Make sure that the DOM hasn't already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; // If there are functions bound, to execute if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; i++ ) jQuery.apply( document, jQuery.readyList[i] ); // 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 ); // If IE is used, use the excellent hack by Matthias Miller // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited } else if ( jQuery.browser == "msie" ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=javascript:void(0)><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser == "safari" ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); })(); |
this.closeTimer=setTimeout(function () {This.onDragCloseTarget()}, This.springLoadedMenuDelay); | this.loadTimer=setTimeout(function () {This.onDragLoadTarget(targetToBeLoaded)}, This.springLoadedMenuDelay); | this.closeTimer=setTimeout(function () {This.onDragCloseTarget()}, This.springLoadedMenuDelay); |
var data = this.text || this.textContent || this.innerHTML || ""; if (window.execScript) window.execScript( data ); else window.setTimeout( data, 0 ); | jQuery.eval ( this.text || this.textContent || this.innerHTML || "" ); | return this.find('script').each(function(){ if ( this.src ) // for some weird reason, it doesn't work if the callback is ommited jQuery.getScript( this.src ); else { // TODO extract into $.eval var data = this.text || this.textContent || this.innerHTML || ""; if (window.execScript) window.execScript( data ); else window.setTimeout( data, 0 ); } }).end(); |
return this.bind(o, function(e){ | return this.each(function(){ var count = 0; jQuery.event.add( this, o, function(e){ if ( count++ ) return; | new function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select," + "submit,keydown,keypress,keyup,error").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; } // If Mozilla is used if ( jQuery.browser.mozilla || jQuery.browser.opera ) { // Use the handy event callback 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 } else if ( jQuery.browser.msie ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser.safari ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); } |
if ( this[o+f] !== null ) return; this[o+f]++; return f.apply(this, [e]); | return f.apply(this, [e]); }); | new function(){ /* * Bind a number of event-handling functions, dynamically */ var e = ("blur,focus,load,resize,scroll,unload,click,dblclick," + "mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select," + "submit,keydown,keypress,keyup,error").split(","); // Go through all the event names, but make sure that // it is enclosed properly for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; } // If Mozilla is used if ( jQuery.browser.mozilla || jQuery.browser.opera ) { // Use the handy event callback 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 } else if ( jQuery.browser.msie ) { // Only works if you document.write() it document.write("<scr" + "ipt id=__ie_init defer=true " + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { if ( this.readyState == "complete" ) jQuery.ready(); }; // Clear from memory script = null; // If Safari is used } else if ( jQuery.browser.safari ) { // Continually check to see if the document.readyState is valid jQuery.safariTimer = setInterval(function(){ // loaded and complete are both valid states if ( document.readyState == "loaded" || document.readyState == "complete" ) { // If either one are found, remove the timer clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; // and execute any waiting functions jQuery.ready(); } }, 10); } // A fallback to window.onload, that will always work jQuery.event.add( window, "load", jQuery.ready ); } |
return this.each(function(){ if ( !this.queue ) this.queue = {}; if ( !this.queue[type] ) this.queue[type] = []; this.queue[type].push( fn ); if ( this.queue[type].length == 1 ) fn.apply(this); | return this.queue(function(){ var i = 0; for ( var p in prop ) { var e = new jQuery.fx( this, jQuery.speed(speed,callback,i++), p ); if ( prop[p].constructor == Number ) e.custom( e.cur(), prop[p] ); else e[ prop[p] ]( prop ); } | return this.each(function(){ if ( !this.queue ) this.queue = {}; if ( !this.queue[type] ) this.queue[type] = []; this.queue[type].push( fn ); if ( this.queue[type].length == 1 ) fn.apply(this); }); |
this.submit(function(e){ e.preventDefault(); $(this).getForm().putForm(target, pre_cb, post_cb); return this; }); | return this.each(function(){ $('input[@type="submit"],input[@type="image"]', this).click(function(ev){ this.form.clicked = this; if (ev.offsetX != undefined) { this.form.clicked_x = ev.offsetX; this.form.clicked_y = ev.offsetY; } else { this.form.clicked_x = ev.pageX - this.offsetLeft; this.form.clicked_y = ev.pageY - this.offsetTop; } }); }).submit(function(e){ | this.submit(function(e){ e.preventDefault(); $(this).getForm().putForm(target, pre_cb, post_cb); return this; }); |
return this.each(function(){ if ( typeof b == 'undefined' ) | this.each(function(){ if ( !b ) | return this.each(function(){ if ( typeof b == 'undefined' ) for ( var j in a ) $.attr(this,j,a[j]); else $.attr(this,a,b); }); |
$.attr(this,j,a[j]); | $.attr(this.style,j,a[j]); | return this.each(function(){ if ( typeof b == 'undefined' ) for ( var j in a ) $.attr(this,j,a[j]); else $.attr(this,a,b); }); |
$.attr(this,a,b); }); | $.attr(this.style,a,b); }) : $.css( this.get(0), a ); | return this.each(function(){ if ( typeof b == 'undefined' ) for ( var j in a ) $.attr(this,j,a[j]); else $.attr(this,a,b); }); |
jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? this[0][n] : null : this.attr( n, h ); | jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); | jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? this[0][n] : null : this.attr( n, h ); }; |
test("$.getJSON(String, Hash, Function) - JSON object", function() { expect(2); stop(); $.getJSON("data/json.php", function(json) { | $.getJSON("data/json.php", function(json) { | test("$.getJSON(String, Hash, Function) - JSON object", function() { expect(2); stop(); $.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); start(); });}); |
} | }; | for ( var i in attr ) new function() { var n = attr[i] || i; jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? this[0][n] : null : this.attr( n, h ); }; } |
test("$.getJSON(String, Hash, Function) - JSON object", function() { expect(2); | test("$.getJSON(String, Hash, Function) - JSON array", function() { expect(4); | test("$.getJSON(String, Hash, Function) - JSON object", function() { expect(2); stop(); $.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); start(); });}); |
$.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); | $.getJSON("data/json.php", {json: "array"}, function(json) { ok( json[0].name == 'John', 'Check JSON: first, name' ); ok( json[0].age == 21, 'Check JSON: first, age' ); ok( json[1].name == 'Peter', 'Check JSON: second, name' ); ok( json[1].age == 25, 'Check JSON: second, age' ); | test("$.getJSON(String, Hash, Function) - JSON object", function() { expect(2); stop(); $.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); start(); });}); |
$.getJSON("data/json.php", function(json) { | test("$.getJSON(String, Hash, Function) - JSON object", function() { expect(2); stop(); $.getJSON("data/json.php", function(json) { | $.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); start(); }); |
}); | $.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); start(); }); |
|
for ( var i in css ) new function() { var n = css[i]; jQuery.fn[ i ] = function(h) { | jQuery.fn[ i ] = function(h) { | for ( var i in css ) new function() { var n = css[i]; jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? jQuery.css( this[0], n ) : null : this.css( n, h ); }; } |
jQuery.each( jQuery.macros.filter, function(i,n){ jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); | jQuery.fn[ i ] = function() { return this.each( n, arguments ); | jQuery.each( jQuery.macros.filter, function(i,n){ jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); }; }); |
}); | jQuery.each( jQuery.macros.filter, function(i,n){ jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); }; }); |
|
for ( var i in attr ) new function() { var n = attr[i] || i; jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? this[0][n] : null : this.attr( n, h ); }; }; | jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? this[0][n] : null : this.attr( n, h ); }; | for ( var i in attr ) new function() { var n = attr[i] || i; jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? this[0][n] : null : this.attr( n, h ); }; }; |
jQuery.fn[ i ] = function() { return this.each( n, arguments ); | jQuery.each( jQuery.macros.filter, function(i,n){ jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); | jQuery.fn[ i ] = function() { return this.each( n, arguments ); }; |
jQuery.each( jQuery.macros.filter, function(i,n){ jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); }; }); | return this.each(function(){ for ( var j = 0; j < a.length; j++ ) jQuery(a[j])[n]( this ); }); | jQuery.each( jQuery.macros.filter, function(i,n){ jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); }; }); |
jQuery.fn[ i ] = function(h) { | for ( var i in attr ) new function() { var n = attr[i] || i; jQuery.fn[ i ] = function(h) { | jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? jQuery.css( this[0], n ) : null : this.css( n, h ); }; |
this.length ? jQuery.css( this[0], n ) : null : this.css( n, h ); | this.length ? this[0][n] : null : this.attr( n, h ); | jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? jQuery.css( this[0], n ) : null : this.css( n, h ); }; |
} | jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? jQuery.css( this[0], n ) : null : this.css( n, h ); }; |
|
return this.each(function(){$.event.trigger(this,t);}); | this.each(function(){ old[old.length] = this; ret = $.merge( ret, $.Select(t,this) ); }); | return this.each(function(){$.event.trigger(this,t);}); |
jQuery.each( jQuery.macros.css, function(i,n){ | jQuery.each( jQuery.macros.attr, function(i,n){ n = n || i; | jQuery.each( jQuery.macros.css, function(i,n){ jQuery.fn[ i ] = function(h) { return h == undefined ? ( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h ); }; }); |
( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h ); | this.length ? this[0][n] : null : this.attr( n, h ); | jQuery.each( jQuery.macros.css, function(i,n){ jQuery.fn[ i ] = function(h) { return h == undefined ? ( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h ); }; }); |
$.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); | test("$.post(String, Hash, Function) - simple with xml", function() { expect(2); stop(); $.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); | $.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); start(); }); |
$.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); | $.getJSON("data/json.php", {json: "array"}, function(json) { ok( json[0].name == 'John', 'Check JSON: first, name' ); ok( json[0].age == 21, 'Check JSON: first, age' ); ok( json[1].name == 'Peter', 'Check JSON: second, name' ); ok( json[1].age == 25, 'Check JSON: second, age' ); | $.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); start(); }); |
test("$.post(String, Hash, Function) - simple with xml", function() { expect(2); stop(); $.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); | $.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); | test("$.post(String, Hash, Function) - simple with xml", function() { expect(2); stop(); $.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); start(); });}); |
}); | test("$.post(String, Hash, Function) - simple with xml", function() { expect(2); stop(); $.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); start(); });}); |
|
jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? jQuery.css( this[0], n ) : null : this.css( n, h ); }; | jQuery.swap( e, old, function() { if (jQuery.css(e,"display") != "none") { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else jQuery.swap( e, { visibility: "hidden", position: "absolute", display: "" }, function(){ oHeight = e.clientHeight; oWidth = e.clientWidth; }); }); | jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? jQuery.css( this[0], n ) : null : this.css( n, h ); }; |
jQuery.fn[ n ] = function(num,fn) { | jQuery.each( jQuery.macros.filter, function(i,n){ jQuery.fn[ n ] = function(num,fn) { | jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); }; |
}); | jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); }; |
|
jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? this[0][n] : null : this.attr( n, h ); | for ( var i = 0; i < jQuery.macros.css.length; i++ ) new function() { var n = jQuery.macros.css[i]; jQuery.fn[ i ] = function(h) { return h == undefined ? ( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h ); }; | jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? this[0][n] : null : this.attr( n, h ); }; |
jQuery.each( jQuery.macros.filter, function(i,n){ jQuery.fn[ n ] = function(num,fn) { | jQuery.fn[ n ] = function(num,fn) { | jQuery.each( jQuery.macros.filter, function(i,n){ jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); }; }); |
jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); | jQuery.each( jQuery.macros.each, function(i,n){ jQuery.fn[ i ] = function() { return this.each( n, arguments ); | jQuery.fn[ n ] = function(num,fn) { return this.filter( ":" + n + "(" + num + ")", fn ); }; |
jQuery.swap( e, old, function() { if (jQuery.css(e,"display") != "none") { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else jQuery.swap( e, { visibility: "hidden", position: "absolute", display: "" }, function(){ oHeight = e.clientHeight; oWidth = e.clientWidth; }); }); | jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? this[0][n] : null : this.attr( n, h ); }; | jQuery.swap( e, old, function() { if (jQuery.css(e,"display") != "none") { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else jQuery.swap( e, { visibility: "hidden", position: "absolute", display: "" }, function(){ oHeight = e.clientHeight; oWidth = e.clientWidth; }); }); |
var fn = args ? (args.constructor == Function ? args : args[args.length-1]) : function(){}; | return this.pushStack( $.map( this, function(a){ return jQuery.Select(t,a); }), arguments ); | var fn = args ? (args.constructor == Function ? args : args[args.length-1]) : function(){}; |
this.each(function(){ old[old.length] = this; ret = $.merge( ret, $.Select(t,this) ); }); | $.grep(this.cur,function(a){ return a != t; }); | this.each(function(){ old[old.length] = this; ret = $.merge( ret, $.Select(t,this) ); }); |
( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h ); | this.length ? this[0][n] : null : this.attr( n, h ); | jQuery.fn[ i ] = function(h) { return h == undefined ? ( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h ); }; |
test("$.post(String, Hash, Function) - simple with xml", function() { expect(2); stop(); $.post("data/name.php", {xml: "5-2"}, function(xml){ | $.post("data/name.php", {xml: "5-2"}, function(xml){ | test("$.post(String, Hash, Function) - simple with xml", function() { expect(2); stop(); $.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); start(); });}); |
this.length ? jQuery.css( this[0], n ) : null : | ( this.length ? jQuery.css( this[0], n ) : null ) : | for ( var i in css ) new function() { var n = css[i]; jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? jQuery.css( this[0], n ) : null : this.css( n, h ); }; } |
} | }; | for ( var i in css ) new function() { var n = css[i]; jQuery.fn[ i ] = function(h) { return h == undefined ? this.length ? jQuery.css( this[0], n ) : null : this.css( n, h ); }; } |
test("$.post(String, Hash, Function) - simple with xml", function() { | test("$.getJSON(String, Hash, Function) - JSON object", function() { | test("$.post(String, Hash, Function) - simple with xml", function() { expect(2); stop(); $.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); start(); });}); |
$.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); | $.getJSON("data/json.php", function(json) { ok( json.data.lang == 'en', 'Check JSON: lang' ); ok( json.data.length == 25, 'Check JSON: length' ); | test("$.post(String, Hash, Function) - simple with xml", function() { expect(2); stop(); $.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); start(); });}); |
$.post("data/name.php", {xml: "5-2"}, function(xml){ | test("$.post(String, Hash, Function) - simple with xml", function() { expect(2); stop(); $.post("data/name.php", {xml: "5-2"}, function(xml){ | $.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); start(); }); |
}); | $.post("data/name.php", {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); start(); }); |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.