rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
this.find("input[@type='submit'],input[@type='hidden'],textarea,input[@checked],input[@type='password'],input[@type='text'],option[@selected]").filter(":enabled").each(function() {
|
.each(function() { if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return;
|
this.find("input[@type='submit'],input[@type='hidden'],textarea,input[@checked],input[@type='password'],input[@type='text'],option[@selected]").filter(":enabled").each(function() { var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); });
|
dates = dates.filter(function (d) { return d.compare(dateToRemove) != 0; });
|
cur_dates.forEach (function (dateToRemove) { dates = dates.filter(function (d) { return d.compare(dateToRemove) != 0; }); });
|
dates = dates.filter(function (d) { return d.compare(dateToRemove) != 0; });
|
return this.domManip(arguments, true, -1, function(a){ this.insertBefore( a, this.firstChild );
|
return this.domManip(arguments, true, 1, function(a){ this.appendChild( a );
|
return this.domManip(arguments, true, -1, function(a){ this.insertBefore( a, this.firstChild ); });
|
}
|
};
|
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; }
|
if(typeof console != "undefined") console.error(e);
|
$.get(files[num],function(js){ js = js.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&"); try { eval(js); } catch(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 = []; blocking = false; process(); });
|
|
setTimeout(function(aTabElt) { gBrowser.selectedTab = aTabElt; }, 0, gBrowser.addTab(url));
|
setTimeout(function(aTabElt) { gBrowser.selectedTab = aTabElt; }, 0, gBrowser.addTab(aUrl, aReferrer, aCharset, aPostData));
|
setTimeout(function(aTabElt) { gBrowser.selectedTab = aTabElt; }, 0, gBrowser.addTab(url));
|
setTimeout(function(loc, aloc) { gURLBar.value = loc; SetPageProxyState("valid", aloc);}, 0, location, aLocation);
|
setTimeout(function(u) { gURLBar.value = u; handleURLBarCommand(); }, 0, url);
|
setTimeout(function(loc, aloc) { gURLBar.value = loc; SetPageProxyState("valid", aloc);}, 0, location, aLocation);
|
jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); };
|
jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); };
|
jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); };
|
return this.domManip(arguments, true, 1, function(a){ this.appendChild( a );
|
return this.domManip(arguments, true, -1, function(a){ this.insertBefore( a, this.firstChild );
|
return this.domManip(arguments, true, 1, function(a){ this.appendChild( a ); });
|
return $.fn.text.apply( [a.childNodes[1]] ).replace(/^\$\./,"").substr(0,1).toUpperCase();
|
return $.fn.text.apply( [a.getElementsByTagName("span")[2]] ).replace(/^\$\./,"").substr(0,1).toUpperCase();
|
$("#docs").alphaPager(function(a){ return $.fn.text.apply( [a.childNodes[1]] ).replace(/^\$\./,"").substr(0,1).toUpperCase(); });
|
.each(function() { if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return;
|
$("input,textarea,option",this).filter(":enabled").each(function(){ if ((this.parentNode.type == 'select-one' || this.parentNode.type == 'select-multiple') && !this.selected) { return null; }
|
.each(function() { // // Skip selects with options which aren't selected if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; // // Skip radio and checkbox elements which aren't checked if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return; // // All other elements are valid ;) var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); });
|
if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return;
|
if ((this.type == 'radio' || this.type == 'checkbox') && !this.checked) { return null; }
|
.each(function() { // // Skip selects with options which aren't selected if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; // // Skip radio and checkbox elements which aren't checked if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return; // // All other elements are valid ;) var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); });
|
var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o);
|
a.push({ name: this.name || this.id || this.parentNode.name || this.parentNode.id, value: this.value
|
.each(function() { // // Skip selects with options which aren't selected if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; // // Skip radio and checkbox elements which aren't checked if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return; // // All other elements are valid ;) var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); });
|
});
|
.each(function() { // // Skip selects with options which aren't selected if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; // // Skip radio and checkbox elements which aren't checked if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return; // // All other elements are valid ;) var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); });
|
|
$.ajax({url: "data/json.php", async: false, success: function(data) { result = data; } });
|
$.ajax({url: "data/json.php", async: false, success: function(data) { ok(true, "sucess callback executed"); result = data; } });
|
test("synchronous request with callbacks", function() { var result; $.ajax({url: "data/json.php", async: false, success: function(data) { result = data; } }); ok( /^{ "data"/.test( result ), "check returned text" );});
|
this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) this.style.display = 'block'; });
|
this.oldblock = $.css(this,"display"); if ( this.oldblock == "none" ) this.oldblock = "block"; this.style.display = "none"; });
|
return this.each(function(){ this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) this.style.display = 'block'; });
|
test("siblings([String])", function() {
|
test("name()", function() {
|
test("siblings([String])", function() { expect(3); isSet( $("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" ); isSet( $("#sndp").siblings("[code]").get(), q("sap"), "Check for filtered siblings (has code child element)" ); isSet( $("#sndp").siblings("[a]").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );});
|
isSet( $("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" ); isSet( $("#sndp").siblings("[code]").get(), q("sap"), "Check for filtered siblings (has code child element)" ); isSet( $("#sndp").siblings("[a]").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );
|
ok( $(document.getElementById('text1')).name() == "action", "Check for name" ); ok( $("#hidden1").name() == "hidden", "Check for name" ); ok( !$("#area1").name(), "Check for name" );
|
test("siblings([String])", function() { expect(3); isSet( $("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" ); isSet( $("#sndp").siblings("[code]").get(), q("sap"), "Check for filtered siblings (has code child element)" ); isSet( $("#sndp").siblings("[a]").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );});
|
test("name()", function() { expect(3); ok( $(document.getElementById('text1')).name() == "action", "Check for name" ); ok( $("#hidden1").name() == "hidden", "Check for name" ); ok( !$("#area1").name(), "Check for name" );
|
test("addClass(String)", function() { var div = $("div"); div.addClass("test"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.indexOf("test") == -1 ) pass = false; } ok( pass, "Add Class" );
|
test("name()", function() { expect(3); ok( $(document.getElementById('text1')).name() == "action", "Check for name" ); ok( $("#hidden1").name() == "hidden", "Check for name" ); ok( !$("#area1").name(), "Check for name" );});
|
test("children([String])", function() { expect(2); isSet( $("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" ); isSet( $("#foo").children("[code]").get(), q("sndp", "sap"), "Check for filtered children" );
|
test("siblings([String])", function() { expect(3); isSet( $("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" ); isSet( $("#sndp").siblings("[code]").get(), q("sap"), "Check for filtered siblings (has code child element)" ); isSet( $("#sndp").siblings("[a]").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );
|
test("children([String])", function() { expect(2); isSet( $("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" ); isSet( $("#foo").children("[code]").get(), q("sndp", "sap"), "Check for filtered children" );});
|
test("siblings([String])", function() { expect(3); isSet( $("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" ); isSet( $("#sndp").siblings("[code]").get(), q("sap"), "Check for filtered siblings (has code child element)" ); isSet( $("#sndp").siblings("[a]").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );
|
test("removeClass(String) - simple", function() { expect(1); var div = $("div").addClass("test").removeClass("test"), pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.indexOf("test") != -1 ) pass = false; } ok( pass, "Remove Class" );
|
test("siblings([String])", function() { expect(3); isSet( $("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" ); isSet( $("#sndp").siblings("[code]").get(), q("sap"), "Check for filtered siblings (has code child element)" ); isSet( $("#sndp").siblings("[a]").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );});
|
test("show()", function() { expect(1); var pass = true, div = $("div"); div.show().each(function(){ if ( this.style.display == "none" ) pass = false; }); ok( pass, "Show" );
|
test("children([String])", function() { expect(2); isSet( $("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" ); isSet( $("#foo").children("[code]").get(), q("sndp", "sap"), "Check for filtered children" );
|
test("show()", function() { expect(1); var pass = true, div = $("div"); div.show().each(function(){ if ( this.style.display == "none" ) pass = false; }); ok( pass, "Show" );});
|
test("children([String])", function() { expect(2); isSet( $("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" ); isSet( $("#foo").children("[code]").get(), q("sndp", "sap"), "Check for filtered children" );
|
test("removeClass(String) - add three classes and remove again", function() { expect(1); var div = $("div").addClass("test").addClass("foo").addClass("bar"); div.removeClass("test").removeClass("bar").removeClass("foo"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.match(/test|bar|foo/) ) pass = false; } ok( pass, "Remove multiple classes" );
|
test("children([String])", function() { expect(2); isSet( $("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" ); isSet( $("#foo").children("[code]").get(), q("sndp", "sap"), "Check for filtered children" );});
|
div.show().each(function(){
|
test("show()", function() { expect(1); var pass = true, div = $("div"); div.show().each(function(){
|
div.show().each(function(){ if ( this.style.display == "none" ) pass = false; });
|
ok( pass, "Show" ); });
|
div.show().each(function(){ if ( this.style.display == "none" ) pass = false; });
|
|
test("show()", function() { expect(1); var pass = true, div = $("div"); div.show().each(function(){ if ( this.style.display == "none" ) pass = false; }); ok( pass, "Show" );
|
test("removeAttr(String", function() { ok( $('#mark').removeAttr("class")[0].className == "", "remove class" );
|
test("show()", function() { expect(1); var pass = true, div = $("div"); div.show().each(function(){ if ( this.style.display == "none" ) pass = false; }); ok( pass, "Show" );});
|
test("addClass(String)", function() { var div = $("div"); div.addClass("test"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.indexOf("test") == -1 ) pass = false; } ok( pass, "Add Class" ); });
|
div.show().each(function(){ if ( this.style.display == "none" ) pass = false; });
|
test("addClass(String)", function() { var div = $("div"); div.addClass("test"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.indexOf("test") == -1 ) pass = false; } ok( pass, "Add Class" );});
|
test("removeClass(String) - simple", function() { expect(1); var div = $("div").addClass("test").removeClass("test"), pass = true;
|
test("addClass(String)", function() { var div = $("div"); div.addClass("test"); var pass = true;
|
test("removeClass(String) - simple", function() { expect(1); var div = $("div").addClass("test").removeClass("test"), pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.indexOf("test") != -1 ) pass = false; } ok( pass, "Remove Class" );});
|
if ( div.get(i).className.indexOf("test") != -1 ) pass = false;
|
if ( div.get(i).className.indexOf("test") == -1 ) pass = false;
|
test("removeClass(String) - simple", function() { expect(1); var div = $("div").addClass("test").removeClass("test"), pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.indexOf("test") != -1 ) pass = false; } ok( pass, "Remove Class" );});
|
ok( pass, "Remove Class" );
|
ok( pass, "Add Class" );
|
test("removeClass(String) - simple", function() { expect(1); var div = $("div").addClass("test").removeClass("test"), pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.indexOf("test") != -1 ) pass = false; } ok( pass, "Remove Class" );});
|
test("removeClass(String) - add three classes and remove again", function() {
|
test("removeClass(String) - simple", function() {
|
test("removeClass(String) - add three classes and remove again", function() { expect(1); var div = $("div").addClass("test").addClass("foo").addClass("bar"); div.removeClass("test").removeClass("bar").removeClass("foo"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.match(/test|bar|foo/) ) pass = false; } ok( pass, "Remove multiple classes" );});
|
var div = $("div").addClass("test").addClass("foo").addClass("bar"); div.removeClass("test").removeClass("bar").removeClass("foo"); var pass = true;
|
var div = $("div").addClass("test").removeClass("test"), pass = true;
|
test("removeClass(String) - add three classes and remove again", function() { expect(1); var div = $("div").addClass("test").addClass("foo").addClass("bar"); div.removeClass("test").removeClass("bar").removeClass("foo"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.match(/test|bar|foo/) ) pass = false; } ok( pass, "Remove multiple classes" );});
|
if ( div.get(i).className.match(/test|bar|foo/) ) pass = false;
|
if ( div.get(i).className.indexOf("test") != -1 ) pass = false;
|
test("removeClass(String) - add three classes and remove again", function() { expect(1); var div = $("div").addClass("test").addClass("foo").addClass("bar"); div.removeClass("test").removeClass("bar").removeClass("foo"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.match(/test|bar|foo/) ) pass = false; } ok( pass, "Remove multiple classes" );});
|
ok( pass, "Remove multiple classes" );
|
ok( pass, "Remove Class" );
|
test("removeClass(String) - add three classes and remove again", function() { expect(1); var div = $("div").addClass("test").addClass("foo").addClass("bar"); div.removeClass("test").removeClass("bar").removeClass("foo"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).className.match(/test|bar|foo/) ) pass = false; } ok( pass, "Remove multiple classes" );});
|
(function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(','); for ( var i = 0; i < e.length; i++ ){ (function(){ var o = e[i]; jQuery.fn[o] = function(f){return this.bind(o, f);}; })();} })();
|
jQuery.fn[o] = function(f){ return this.bind(o, f); };
|
(function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(','); for ( var i = 0; i < e.length; i++ ){ (function(){ var o = e[i]; jQuery.fn[o] = function(f){return this.bind(o, f);}; })();}})();
|
jQuery.fn[o] = function(f){ return this.bind(o, f); };
|
setTimeout(function(){ if (xml) { xml.abort(); if ( !requestDone ) onreadystatechange( "timeout" ); xml = null; } }, s.timeout);
|
jQuery.fn[o] = function(f){ return this.bind(o, f); };
|
new $.fx.Opacity(this,o).show();
|
new $.fx.Opacity(this,o,1).show();
|
return a ? this.each(function(){ new $.fx.Opacity(this,o).show(); }) : this._show();
|
$('#first').load('data/test.html', function() { ok( $('#first').html().match(/^html text/), 'Check content after loading html' ); ok( foo == "foo", 'Check if script was evaluated after load' ); setTimeout(verifyEvaluation, 600); });
|
test("serialize()", function() { expect(1); var data = $(':input').not('button').serialize(); ok( data == 'action=Test&text2=Test&radio1=on&radio2=on&check=on&=on&hidden=&foo[bar]=&name=name&=foobar&select1=&select2=3&select3=1', 'Check form serialization as query string' ); });
|
$('#first').load('data/test.html', function() { ok( $('#first').html().match(/^html text/), 'Check content after loading html' ); ok( foo == "foo", 'Check if script was evaluated after load' ); setTimeout(verifyEvaluation, 600); });
|
jQuery.fn[o] = function(f){
|
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){
|
jQuery.fn[o] = function(f){ return this.bind(o, f); };
|
};
|
jQuery.fn[o] = function(f){ return this.bind(o, f); };
|
|
function(row) { return "<input type='button' value='Test' onclick='runTest(" + rownum + ")'/>"; },
|
function(row) { return "<input type='button' value='Test' onclick='setSettings();runTest(" + rownum + ")'/>"; },
|
function(row) { return "<input type='button' value='Test' onclick='runTest(" + rownum + ")'/>"; },
|
var e = ['ajaxStart','ajaxComplete','ajaxError','ajaxSuccess'];
|
var e = "ajaxStart.ajaxComplete.ajaxError.ajaxSuccess".split(',');
|
(function(){ var e = ['ajaxStart','ajaxComplete','ajaxError','ajaxSuccess']; for ( var i = 0; i < e.length; i++ ){ (function(){ var o = e[i]; $.fn[o] = function(f){return this.bind(o, f);}; })();}})();
|
this.submit(function(e){ e.preventDefault(); $(this).getForm().putForm(target, pre_cb, post_cb); return this; });
|
(function(){ var e = ['ajaxStart','ajaxComplete','ajaxError','ajaxSuccess']; for ( var i = 0; i < e.length; i++ ){ (function(){ var o = e[i]; $.fn[o] = function(f){return this.bind(o, f);}; })();} })();
|
this.submit(function(e){ e.preventDefault(); $(this).getForm().putForm(target, pre_cb, post_cb); return this; });
|
this.each(function(value, index) { if (!(result &= (iterator || Prototype.K)(value, index))) throw $break; });
|
this._each(function(value) { try { iterator(value, index++); } catch (e) { if (e != $continue) throw e; } });
|
this.each(function(value, index) { if (!(result &= (iterator || Prototype.K)(value, index))) throw $break; });
|
z[j] = function(a,b){ if(c(a,b,"height")) h[j](); if(c(a,b,"width")) w[j](); };
|
return a ? this.each(function(){ new fx.Opacity(this,o).show(); }) : this._show();
|
z[j] = function(a,b){ if(c(a,b,"height")) h[j](); if(c(a,b,"width")) w[j](); };
|
test("serialize()", function() { expect(1); var data = $(':input').not('button').serialize(); ok( data == 'action=Test&text2=Test&radio1=on&radio2=on&check=on&=on&hidden=&foo[bar]=&name=name&=foobar&select1=&select2=3&select3=1', 'Check form serialization as query string' );
|
test("load(String, Object, Function) - check scripts", function() { expect(7); stop(); testFoo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated after load' ); ok( $('#foo').html() == 'foo', 'Check if script evaluation has modified DOM'); ok( $('#ap').html() == 'bar', 'Check if script evaluation has modified DOM'); start(); }; $('#first').load('data/test.html', function() { ok( $('#first').html().match(/^html text/), 'Check content after loading html' ); ok( testFoo == "foo", 'Check if script was evaluated after load' ); setTimeout(verifyEvaluation, 600); });
|
test("serialize()", function() { expect(1); var data = $(':input').not('button').serialize(); // ignore button, IE takes text content as value, not relevant for this test ok( data == 'action=Test&text2=Test&radio1=on&radio2=on&check=on&=on&hidden=&foo[bar]=&name=name&=foobar&select1=&select2=3&select3=1', 'Check form serialization as query string' );});
|
setTimeout(function(u) { gURLBar.value = u; handleURLBarCommand(); }, 0, url);
|
setTimeout(function(aTabElt) { gBrowser.selectedTab = aTabElt; }, 0, gBrowser.addTab(aUrl, aReferrer, aCharset, aPostData));
|
setTimeout(function(u) { gURLBar.value = u; handleURLBarCommand(); }, 0, url);
|
cur_dates.forEach (function (dateToAdd) { if (!dates.some(function (d) { return d.compare(dateToAdd) == 0; })) { if (aIncludeExceptions && rinfo.mExceptions) { if (!rinfo.getExceptionFor(dateToAdd, false)) dates.push(dateToAdd); } else { dates.push(dateToAdd); } } });
|
dates = dates.filter(function (d) { return d.compare(dateToRemove) != 0; });
|
cur_dates.forEach (function (dateToAdd) { if (!dates.some(function (d) { return d.compare(dateToAdd) == 0; })) { if (aIncludeExceptions && rinfo.mExceptions) { // only add if there's no exception for this; // we'll test all exception dates later on if (!rinfo.getExceptionFor(dateToAdd, false)) dates.push(dateToAdd); } else { dates.push(dateToAdd); } } });
|
return this.domManip(arguments, false, 1, function(a){ this.parentNode.insertBefore( a, this );
|
return this.domManip(arguments, true, -1, function(a){ this.insertBefore( a, this.firstChild );
|
return this.domManip(arguments, false, 1, function(a){ this.parentNode.insertBefore( a, this ); });
|
jQuery.class.add(this,c);
|
jQuery.className.add(this,c);
|
return this.each(function(){ jQuery.class.add(this,c); });
|
jQuery.prototype["do"+o] = function(){ return this.trigger(o); };
|
jQuery.fn["one"+o] = function(f){ return this.bind(o, function(e){ if ( this[o+f] !== null ) return; this[o+f]++; return f.apply(this, [e]); }); };
|
jQuery.prototype["do"+o] = function(){ return this.trigger(o); };
|
return this.domManip(arguments, true, -1, function(a){ this.insertBefore( a, this.firstChild );
|
return this.domManip(arguments, false, 1, function(a){ this.parentNode.insertBefore( a, this );
|
return this.domManip(arguments, true, -1, function(a){ this.insertBefore( a, this.firstChild ); });
|
if ( count++ ) return;
|
if ( count++ ) return true;
|
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]); }); }); };
|
f.apply(this, arguments);
|
return f.apply(this, arguments);
|
jQuery.fn["one"+o] = function(f){ // save cloned reference to this var element = jQuery(this); var handler = function() { // unbind itself when executed element.unbind(o, handler); element = null; // apply original handler with the same arguments f.apply(this, arguments); }; return this.bind(o, handler); };
|
element = null;
|
jQuery.fn["one"+o] = function(f){ // save cloned reference to this var element = jQuery(this); var handler = function() { // unbind itself when executed element.unbind(o, handler); // apply original handler with the same arguments f.apply(this, arguments); }; return this.bind(o, handler); };
|
|
return this.each(function(){ var count = 0; jQuery.event.add( this, o, function(e){ if ( count++ ) return true; return f.apply(this, [e]); }); });
|
return this.bind(o, f, 1);
|
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 true; // And execute the bound function return f.apply(this, [e]); }); }); };
|
try { $.eval( this.text || this.textContent || this.innerHTML ); } catch(e) { }
|
try { $.eval( this.text || this.textContent || this.innerHTML || "" ); } catch(e) { }
|
function(sResult) { sResult = $.httpData(sResult); // Update the element with the new HTML el.html(sResult); // Evaluate the scripts AFTER this (so you can allready modify the new HTML!) el.html(sResult).find("script").each(function(){ try { $.eval( this.text || this.textContent || this.innerHTML ); } catch(e) { } }); // And call the callback handler :) if (fCallback && (fCallback.constructor == Function)) fCallback(); }
|
return this.bind(o, function(e){
|
return this.each(function(){ var count = 0; jQuery.event.add( this, o, function(e){ if ( count++ ) return;
|
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 ( this[o+f] !== null ) return; this[o+f]++; return f.apply(this, [e]);
|
return f.apply(this, [e]); });
|
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]); }); };
|
this.$$oldblock = $.getCSS(this,"display"); if ( this.$$oldblock == "none" ) this.$$oldblock = 'block'; this.style.display = 'none'; });
|
$.class.add(this,c); });
|
return this.each(function(){ this.$$oldblock = $.getCSS(this,"display"); if ( this.$$oldblock == "none" ) this.$$oldblock = 'block'; this.style.display = 'none'; });
|
for ( var i = 0; i < e.length; i++ ){ (function(){ var o = e[i]; jQuery.fn[o] = function(f){return this.bind(o, f);}; })();}
|
jQuery.ajax( "GET", url, null, function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); });
|
for ( var i = 0; i < e.length; i++ ){ (function(){ var o = e[i]; jQuery.fn[o] = function(f){return this.bind(o, f);}; })();}
|
ef = new fx.Opacity(this,o);
|
ef = new $.fx.Opacity(this,o);
|
return a ? this.each(function(){ ef = new fx.Opacity(this,o); ef.custom(ef.cur(),parseFloat(ev)); ef.show(); }) : this._show();
|
return this.each(function(){ if ( !f && this.nodeName == 'IMG' && !this.offsetWidth && !this.offsetHeight ) { var self = this; setTimeout(function(){ $(self).center(true); }, 13); } else { var s = this.style; var p = this.parentNode; if ( $.css(p,"position") == 'static' ) { p.style.position = 'relative'; } s.position = 'absolute'; s.left = parseInt(($.css(p,"width") - $.css(this,"width"))/2, 10) + "px"; s.top = parseInt(($.css(p,"height") - $.css(this,"height"))/2, 10) + "px"; } });
|
return a ? this.each(function(){ ef = new fx.Opacity(this,o); ef.custom(ef.cur(),parseFloat(ev)); ef.show(); }) : this._show();
|
return this.each(function(){ if ( !f && this.nodeName == 'IMG' && !this.offsetWidth && !this.offsetHeight ) { var self = this; setTimeout(function(){ $(self).center(true); }, 13); } else { var s = this.style; var p = this.parentNode; if ( $.css(p,"position") == 'static' ) { p.style.position = 'relative'; } s.position = 'absolute'; s.left = parseInt(($.css(p,"width") - $.css(this,"width"))/2, 10) + "px"; s.top = parseInt(($.css(p,"height") - $.css(this,"height"))/2, 10) + "px"; } });
|
test("serialize()", function() { expect(1); var data = $(':input').not('button').serialize(); ok( data == 'action=Test&text2=Test&radio1=on&radio2=on&check=on&=on&hidden=&foo[bar]=&name=name&=foobar&select1=&select2=3&select3=1', 'Check form serialization as query string' );
|
test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});
|
test("serialize()", function() { expect(1); var data = $(':input').not('button').serialize(); // ignore button, IE takes text content as value, not relevant for this test ok( data == 'action=Test&text2=Test&radio1=on&radio2=on&check=on&=on&hidden=&foo[bar]=&name=name&=foobar&select1=&select2=3&select3=1', 'Check form serialization as query string' );});
|
jQuery.ajax( "GET", url, null, function(r, status) { if ( callback ) callback( jQuery.httpData(r,type), status ); }, ifModified);
|
jQuery.fn[o] = function(f){ return this.bind(o, f); };
|
jQuery.ajax( "GET", url, null, function(r, status) { if ( callback ) callback( jQuery.httpData(r,type), status ); }, ifModified);
|
$('*', this).each(function() { if (this.disabled || this.type == 'reset' || (this.type == 'checkbox' && !this.checked) || (this.type == 'radio' && !this.checked)) return; if (this.type == 'submit' || this.type == 'image') { if (this.form.clicked != this) return; if (this.type == 'image') { if (this.form.clicked_x) { a.push({name: this.name+'_x', value: this.form.clicked_x}); a.push({name: this.name+'_y', value: this.form.clicked_y}); return; } } } if (!ok[this.nodeName.toUpperCase()]) return; var par = this.parentNode; var p = par.nodeName.toUpperCase(); if ((p == 'SELECT' || p == 'OPTGROUP') && !this.selected) return; var n = this.name || par.name; if (!n && p == 'OPTGROUP' && (par = par.parentNode)) n = par.name; if (n == undefined) return; a.push({name: n, value: this.value}); });
|
for ( var i = 0; i < e.length; i++ ){ (function(){ var o = e[i]; $.fn[o] = function(f){return this.bind(o, f);}; })();}
|
$('*', this).each(function() { if (this.disabled || this.type == 'reset' || (this.type == 'checkbox' && !this.checked) || (this.type == 'radio' && !this.checked)) return; if (this.type == 'submit' || this.type == 'image') { if (this.form.clicked != this) return; if (this.type == 'image') { if (this.form.clicked_x) { a.push({name: this.name+'_x', value: this.form.clicked_x}); a.push({name: this.name+'_y', value: this.form.clicked_y}); return; } } } if (!ok[this.nodeName.toUpperCase()]) return; var par = this.parentNode; var p = par.nodeName.toUpperCase(); if ((p == 'SELECT' || p == 'OPTGROUP') && !this.selected) return; var n = this.name || par.name; if (!n && p == 'OPTGROUP' && (par = par.parentNode)) n = par.name; if (n == undefined) return; a.push({name: n, value: this.value}); });
|
if (result &= (iterator || Prototype.K)(value, index)) throw $break;
|
result = result && !!(iterator || Prototype.K)(value, index); if (!result) throw $break;
|
this.each(function(value, index) { if (result &= (iterator || Prototype.K)(value, index)) throw $break; });
|
for(var i in fx.fn){(function(){ var j = fx.fn[i]; z[j] = function(a,b){p[j]();r[j](a,b);}; })()}
|
return this.each(function(){ if ( !f && this.nodeName == 'IMG' && !this.offsetWidth && !this.offsetHeight ) { var self = this; setTimeout(function(){ $(self).center(true); }, 13); } else { var s = this.style; var p = this.parentNode; if ( $.css(p,"position") == 'static' ) p.style.position = 'relative'; s.position = 'absolute'; s.left = parseInt(($.css(p,"width") - $.css(this,"width"))/2) + "px"; s.top = parseInt(($.css(p,"height") - $.css(this,"height"))/2) + "px"; } });
|
for(var i in fx.fn){(function(){ var j = fx.fn[i]; z[j] = function(a,b){p[j]();r[j](a,b);}; })()}
|
test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }}); });
|
$('#first').load('data/test.html', function() { ok( $('#first').html().match(/^html text/), 'Check content after loading html' ); ok( testFoo == "foo", 'Check if script was evaluated after load' ); setTimeout(verifyEvaluation, 600); });
|
test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});});
|
setTimeout(function() { this.WebSearch(); }, 0);
|
setTimeout(function(u) { gURLBar.value = u; handleURLBarCommand(); }, 0, url);
|
setTimeout(function() { this.WebSearch(); }, 0);
|
if (!dates.some(function (d) { return d.compare(dateToAdd) == 0; })) {
|
cur_dates.forEach (function (dateToAdd) { if (!dates.some(function (d) { return d.compare(dateToAdd) == 0; })) { dates.push(dateToAdd); } });
|
if (!dates.some(function (d) { return d.compare(dateToAdd) == 0; })) {
|
return this.domManip(arguments, false, -1, function(a){ this.parentNode.insertBefore( a, this.nextSibling );
|
return this.domManip(arguments, false, 1, function(a){ this.parentNode.insertBefore( a, this );
|
return this.domManip(arguments, false, -1, function(a){ this.parentNode.insertBefore( a, this.nextSibling ); });
|
jQuery.ajax( "GET", url, null, function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); });
|
jQuery.ajax( "GET", url, null, function(r, status) { if ( callback ) callback( jQuery.httpData(r,type), status ); }, ifModified);
|
jQuery.ajax( "GET", url, null, function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); });
|
jQuery.class.remove(this,c);
|
jQuery.className.remove(this,c);
|
return this.each(function(){ jQuery.class.remove(this,c); });
|
jQuery.prototype["one"+o] = function(f){ return this.bind(o, function(e){
|
return this.bind(o, function(e){
|
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]); }); };
|
if ( this[o+f] !== null ) return true;
|
if ( this[o+f] !== null ) return;
|
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]); }); };
|
};
|
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]); }); };
|
|
return this.domManip(arguments, false, 1, function(a){ this.parentNode.insertBefore( a, this );
|
return this.domManip(arguments, false, -1, function(a){ this.parentNode.insertBefore( a, this.nextSibling );
|
return this.domManip(arguments, false, 1, function(a){ this.parentNode.insertBefore( a, this ); });
|
if ( count++ ) return;
|
if ( count++ ) return true;
|
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]); }); });
|
return this.each(function(){ var count = 0; jQuery.event.add( this, o, function(e){ if ( count++ ) return true; return f.apply(this, [e]); }); });
|
jQuery.safariTimer = setInterval(function(){ if ( document.readyState == "loaded" || document.readyState == "complete" ) { clearInterval( jQuery.safariTimer ); jQuery.safariTimer = null; jQuery.ready(); } }, 10);
|
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 true; // And execute the bound function return f.apply(this, [e]); }); });
|
try { $.eval( this.text || this.textContent || this.innerHTML ); } catch(e) { }
|
try { $.eval( this.text || this.textContent || this.innerHTML || "" ); } catch(e) { }
|
el.html(sResult).find("script").each(function(){ try { $.eval( this.text || this.textContent || this.innerHTML ); } catch(e) { } });
|
return this.bind(o, function(e){
|
return this.each(function(){ var count = 0; jQuery.event.add( this, o, function(e){ if ( count++ ) return;
|
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 ( this[o+f] !== null ) return; this[o+f]++; return f.apply(this, [e]);
|
return f.apply(this, [e]); });
|
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 ($.hasWord(this,c)) return; this.className += ( this.className.length > 0 ? " " : "" ) + c; });
|
$.class.remove(this,c); });
|
return this.each(function(){ if ($.hasWord(this,c)) return; this.className += ( this.className.length > 0 ? " " : "" ) + c; });
|
jQuery.fn[o] = function(f){return this.bind(o, f);};
|
jQuery.ajax( "POST", url, jQuery.param(data), function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); });
|
jQuery.fn[o] = function(f){return this.bind(o, f);};
|
s.left = parseInt(($.css(p,"width") - $.css(this,"width"))/2, 10) + "px"; s.top = parseInt(($.css(p,"height") - $.css(this,"height"))/2, 10) + "px";
|
s.left = (($.css(p,"width") - $.css(this,"width"))/2) + "px"; s.top = (($.css(p,"height") - $.css(this,"height"))/2) + "px";
|
return this.each(function(){ if ( !f && this.nodeName == 'IMG' && !this.offsetWidth && !this.offsetHeight ) { var self = this; setTimeout(function(){ $(self).center(true); }, 13); } else { var s = this.style; var p = this.parentNode; if ( $.css(p,"position") == 'static' ) { p.style.position = 'relative'; } s.position = 'absolute'; s.left = parseInt(($.css(p,"width") - $.css(this,"width"))/2, 10) + "px"; s.top = parseInt(($.css(p,"height") - $.css(this,"height"))/2, 10) + "px"; } });
|
setTimeout(function() { self.asyncUpdateUI(); }, 0);
|
setTimeout(function(loc) { gURLBar.value = ""; gURLBar.value = loc; SetPageProxyState("valid"); }, 0, location);
|
setTimeout(function() { self.asyncUpdateUI(); }, 0);
|
setTimeout(function(){
|
return this.each(function(){ if ( !f && this.nodeName == 'IMG' && !this.offsetWidth && !this.offsetHeight ) { var self = this; setTimeout(function(){
|
setTimeout(function(){ $(self).center(true); }, 13);
|
} else { var s = this.style; var p = this.parentNode; if ( $.css(p,"position") == 'static' ) { p.style.position = 'relative'; } s.position = 'absolute'; s.left = parseInt(($.css(p,"width") - $.css(this,"width"))/2, 10) + "px"; s.top = parseInt(($.css(p,"height") - $.css(this,"height"))/2, 10) + "px"; } });
|
setTimeout(function(){ $(self).center(true); }, 13);
|
|
test("test global handlers - success", function() {
|
test("test global handlers - failure", function() {
|
test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});});
|
error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' );
|
error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' );
|
test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});});
|
$.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start();
|
$.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start();
|
test("test global handlers - success", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); start(); }}); }});});
|
if ( c == null ) this.className = ''; else
|
this.className = c == null ? '' :
|
return this.each(function(){ if ( c == null ) this.className = ''; else this.className.replace( new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); });
|
jQuery.ajax( "POST", url, jQuery.param(data), function(r, status) {
|
jQuery.ajax( "GET", url, null, function(r, status) {
|
jQuery.ajax( "POST", url, jQuery.param(data), function(r, status) { if ( callback ) callback( jQuery.httpData(r,type), status ); });
|
});
|
}, ifModified);
|
jQuery.ajax( "POST", url, jQuery.param(data), function(r, status) { if ( callback ) callback( jQuery.httpData(r,type), status ); });
|
test("test global handlers - success", function() { expect(8);
|
test("load(String, Object, Function) - check scripts", function() { expect(7);
|
test("test global handlers - success", function() { expect(8); stop(); var counter = { complete: 0, success: 0, error: 0, send: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }, send = function() { counter.send++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxSend(send).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", beforeSend: send, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); ok( counter.send == 2, 'Check succesful request' ); counter.error = counter.success = counter.complete = counter.send = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", beforeSend: send, success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); ok( counter.send == 2, 'Check failed request' ); start(); }}); }});});
|
var counter = { complete: 0, success: 0, error: 0, send: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }, send = function() { counter.send++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxSend(send).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); $.ajax({url: "data/name.php", beforeSend: send, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); ok( counter.send == 2, 'Check succesful request' ); counter.error = counter.success = counter.complete = counter.send = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", beforeSend: send, success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); ok( counter.send == 2, 'Check failed request' ); start(); }}); }});
|
testFoo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated after load' ); ok( $('#foo').html() == 'foo', 'Check if script evaluation has modified DOM'); ok( $('#ap').html() == 'bar', 'Check if script evaluation has modified DOM'); start(); }; $('#first').load('data/test.html', function() { ok( $('#first').html().match(/^html text/), 'Check content after loading html' ); ok( testFoo == "foo", 'Check if script was evaluated after load' ); setTimeout(verifyEvaluation, 600); });
|
test("test global handlers - success", function() { expect(8); stop(); var counter = { complete: 0, success: 0, error: 0, send: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }, send = function() { counter.send++ }; $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxSend(send).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); // start with successful test $.ajax({url: "data/name.php", beforeSend: send, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); ok( counter.send == 2, 'Check succesful request' ); counter.error = counter.success = counter.complete = counter.send = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", beforeSend: send, success: success, error: error, complete: function() { ok( counter.error == 2, 'Check failed request' ); ok( counter.success == 0, 'Check failed request' ); ok( counter.complete == 3, 'Check failed request' ); ok( counter.send == 2, 'Check failed request' ); start(); }}); }});});
|
$.xml(mth, url, $.param(this.vars), function(r) { eval(r.responseText); });
|
$.fn[o] = function(f){return this.bind(o, f);};
|
$.xml(mth, url, $.param(this.vars), function(r) { eval(r.responseText); });
|
z[j] = function(a,b){p[j]();r[j](a,b);};
|
setTimeout(function(){ $(self).center(true); }, 13);
|
z[j] = function(a,b){p[j]();r[j](a,b);};
|
test("test global handlers - failure", function() {
|
test("test global handlers - success", function() {
|
test("test global handlers - failure", function() { expect(6); stop(); var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }});});
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.