rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
test("$.ajax - preprocess", function() { | test("$.ajax - beforeSend", function() { | test("$.ajax - preprocess", function() { expect(1); stop(); var customHeader = "value"; $.ajax({ url: "data/name.php", data: {'req': true}, beforeSend: function(xml) { xml.setRequestHeader('X-Custom-Header', customHeader); }, success: function(data) { ok( data == customHeader, "check return value, should be t... |
function(a,f) {return jQuery.grep(a,f,true);}; | "~", function(a){ var r = []; var s = jQuery.sibling(a); if ( s.n > 0 ) for ( var i = s.n; i < s.length; i++ ) r.push( s[i] ); return r; } | function(a,f) {return jQuery.grep(a,f,true);}; |
r = jQuery.grep( r, function(e) { return rec.test(e.className); }); | function(a){ return eval(jQuery.token[i+1]); }); | r = jQuery.grep( r, function(e) { return rec.test(e.className); }); |
this.each(function(responder) { if (responder[callback] && typeof responder[callback] == 'function') { try { responder[callback].apply(responder, [request, transport, json]); } catch (e) { } } }); | function() {return new XMLHttpRequest()} | this.each(function(responder) { if (responder[callback] && typeof responder[callback] == 'function') { try { responder[callback].apply(responder, [request, transport, json]); } catch (e) { } } }); |
new function() { var b = navigator.userAgent.toLowerCase(); jQuery.browser = { safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b), mozilla: /mozilla/.test(b) && !/compatible/.test(b) }; jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat"; }; | function(a,f) {return jQuery.grep(a,f,true);}; | new function() { var b = navigator.userAgent.toLowerCase(); // Figure out what browser is being used jQuery.browser = { safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b), mozilla: /mozilla/.test(b) && !/compatible/.test(b) }; // Check to see if the W3C box model is being use... |
var t = $.grep($.sibling(a),function(b){return b.nodeName == a.nodeName;}); | a = a.replace(r,function(z,b){return b.toUpperCase();}); | var t = $.grep($.sibling(a),function(b){return b.nodeName == a.nodeName;}); |
function(a,f) {return jQuery.grep(a,f,true);}; | name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();}); | function(a,f) {return jQuery.grep(a,f,true);}; |
$("#main > p#ap > a").filter("#foobar",function(){},function(i){ ok( this == q("google","groups", "mark")[i], "Filter elements, else context" ); }); | test("expressions - element", function() { expect(5); ok( $("*").size() >= 30, "Select all" ); t( "Element Selector", "div", ["main","foo"] ); t( "Element Selector", "body", ["body"] ); t( "Element Selector", "html", ["html"] ); t( "Parent Element", "div div", ["foo"] ); }); | $("#main > p#ap > a").filter("#foobar",function(){},function(i){ ok( this == q("google","groups", "mark")[i], "Filter elements, else context" ); }); |
function(a,f) {return jQuery.grep(a,f,true);}; | new function() { var b = navigator.userAgent.toLowerCase(); jQuery.browser = { safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b), mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b) }; jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat"; }; | function(a,f) {return jQuery.grep(a,f,true);}; |
mozilla: /mozilla/.test(b) && !/compatible/.test(b) | mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b) | new function() { var b = navigator.userAgent.toLowerCase(); // Figure out what browser is being used jQuery.browser = { safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b), mozilla: /mozilla/.test(b) && !/compatible/.test(b) }; // Check to see if the W3C box model is being use... |
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();}); | r = jQuery.grep( r, function(e) { return rec.test(e.className); }); | name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();}); |
ok($("#main > p#ap > a").not("#google").length == 2, ".not") | ok($("#main > p#ap > a").not("#google").length == 2, "not('selector')") isSet( $("p").not("#ap, #sndp").get(), q("firstp", "en", "sap", "first", "result"), "not('selector, selector')" ); | test("not(String)", function() { ok($("#main > p#ap > a").not("#google").length == 2, ".not")}); |
test("not(String)", function() { ok($("#main > p#ap > a").not("#google").length == 2, "not('selector')") isSet( $("p").not("#ap, #sndp").get(), q("firstp", "en", "sap", "first", "result"), "not('selector, selector')" ); | test("expressions - id", function() { expect(5); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL/*", [] ); | test("not(String)", function() { ok($("#main > p#ap > a").not("#google").length == 2, "not('selector')") isSet( $("p").not("#ap, #sndp").get(), q("firstp", "en", "sap", "first", "result"), "not('selector, selector')" );}); |
r = jQuery.grep( r, function(e){ return re.test(e.className || ''); }, not); | name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();}); | r = jQuery.grep( r, function(e){ return re.test(e.className || ''); }, not); |
test("is(String)", function() { expect(22); ok( $('#form').is('form'), 'Check for element: A form must be a form' ); ok( !$('#form').is('div'), 'Check for element: A form is not a div' ); ok( $('#mark').is('.blog'), 'Check for class: Expected class "blog"' ); ok( !$('#mark').is('.link'), 'Check for class: Did not expec... | test("expressions - class", function() { expect(4); t( "Class Selector", ".blog", ["mark","simon"] ); t( "Class Selector", ".blog.link", ["simon"] ); t( "Class Selector w/ Element", "a.blog", ["mark","simon"] ); t( "Parent Class Selector", "p .blog", ["mark","simon"] ); | test("is(String)", function() { expect(22); ok( $('#form').is('form'), 'Check for element: A form must be a form' ); ok( !$('#form').is('div'), 'Check for element: A form is not a div' ); ok( $('#mark').is('.blog'), 'Check for class: Expected class "blog"' ); ok( !$('#mark').is('.link'), 'Check for class: Did not expec... |
new function() { var b = navigator.userAgent.toLowerCase(); jQuery.browser = { safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b), mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b) }; jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat"; }; | r = jQuery.grep( r, function(e){ return re.test(e.className || ''); }, not); | new function() { var b = navigator.userAgent.toLowerCase(); // Figure out what browser is being used jQuery.browser = { safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b), mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b) }; // Check to see if the W3C box model is ... |
setTimeout((function() { for (var i = 0; i < scripts.length; i++) eval(scripts[i].match(match)[1]); }).bind(this), 10); | this.options.onComplete = (function(transport, object) { this.updateContent(); onComplete(transport, object); }).bind(this); | setTimeout((function() { for (var i = 0; i < scripts.length; i++) eval(scripts[i].match(match)[1]); }).bind(this), 10); |
test("$.extend(Object, Object)", function() { expect(2); var settings = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, options = { xnumber2: 1, xstring2: "x", xxx: "newstring" }, optionsCopy = { xnumber2: 1, xstring2: "x", xxx: "newstring" }, merged = { xnumber1: 5, xnumber2: 1, xstring1: "peter"... | test("expressions - multiple", function() { expect(4); t( "Comma Support", "a.blog, div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog , div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog ,div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog,div", ["mark","simon","main","fo... | test("$.extend(Object, Object)", function() { expect(2); var settings = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, options = { xnumber2: 1, xstring2: "x", xxx: "newstring" }, optionsCopy = { xnumber2: 1, xstring2: "x", xxx: "newstring" }, merged = { xnumber1: 5, xnumber2: 1, xstring1: "pet... |
if (Element.hasClassName(child, className)) | if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) | return $A(children).inject([], function(elements, child) { if (Element.hasClassName(child, className)) elements.push(child); return elements; }); |
test("expressions - element", function() { expect(5); ok( $("*").size() >= 30, "Select all" ); t( "Element Selector", "div", ["main","foo"] ); t( "Element Selector", "body", ["body"] ); t( "Element Selector", "html", ["html"] ); t( "Parent Element", "div div", ["foo"] ); | test("$.extend(Object, Object, Object, Object)", function() { expect(4); var defaults = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, defaultsCopy = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, options1 = { xnumber2: 1, xstring2: "x" }, options1Copy = { xnumber2: 1, xstring2... | test("expressions - element", function() { expect(5); ok( $("*").size() >= 30, "Select all" ); t( "Element Selector", "div", ["main","foo"] ); t( "Element Selector", "body", ["body"] ); t( "Element Selector", "html", ["html"] ); t( "Parent Element", "div div", ["foo"] );}); |
test("$.extend(Object, Object, Object, Object)", function() { expect(4); var defaults = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, defaultsCopy = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, options1 = { xnumber2: 1, xstring2: "x" }, options1Copy = { xnumber2: 1, xstring2... | test("expressions - child and adjacent", function() { expect(14); t( "Child", "p > a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p> a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p >a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p>a", ["simon1"... | test("$.extend(Object, Object, Object, Object)", function() { expect(4); var defaults = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, defaultsCopy = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, options1 = { xnumber2: 1, xstring2: "x" }, options1Copy = { xnumber2: 1, xstri... |
t("Select options via [@selected]", "#select1 option[@selected]", [] ); | t("Select options via [@selected]", "#select1 option[@selected]", ["option1a"] ); | test("expressions - attributes", function() { expect(19); t( "Attribute Exists", "a[@title]", ["google"] ); t( "Attribute Exists", "*[@title]", ["google"] ); t( "Attribute Exists", "[@title]", ["google"] ); t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] ); t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1... |
test("expressions - id", function() { | test("expressions - element", function() { | test("expressions - id", function() { expect(5); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL/*", [] );}); |
t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL/*", [] ); | ok( $("*").size() >= 30, "Select all" ); t( "Element Selector", "div", ["main","foo"] ); t( "Element Selector", "body", ["body"] ); t( "Element Selector", "html", ["html"] ); t( "Parent Element", "div div", ["foo"] ); | test("expressions - id", function() { expect(5); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL/*", [] );}); |
test("expressions - element", function() { expect(5); ok( $("*").size() >= 30, "Select all" ); t( "Element Selector", "div", ["main","foo"] ); t( "Element Selector", "body", ["body"] ); t( "Element Selector", "html", ["html"] ); t( "Parent Element", "div div", ["foo"] ); | test("expressions - attributes", function() { expect(16); t( "Attribute Exists", "a[@title]", ["google"] ); t( "Attribute Exists", "*[@title]", ["google"] ); t( "Attribute Exists", "[@title]", ["google"] ); t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] ); t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1... | test("expressions - element", function() { expect(5); ok( $("*").size() >= 30, "Select all" ); t( "Element Selector", "div", ["main","foo"] ); t( "Element Selector", "body", ["body"] ); t( "Element Selector", "html", ["html"] ); t( "Parent Element", "div div", ["foo"] );}); |
test("expressions - class", function() { expect(4); t( "Class Selector", ".blog", ["mark","simon"] ); t( "Class Selector", ".blog.link", ["simon"] ); t( "Class Selector w/ Element", "a.blog", ["mark","simon"] ); t( "Parent Class Selector", "p .blog", ["mark","simon"] ); | test("expressions - id", function() { expect(5); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL/*", [] ); | test("expressions - class", function() { expect(4); t( "Class Selector", ".blog", ["mark","simon"] ); t( "Class Selector", ".blog.link", ["simon"] ); t( "Class Selector w/ Element", "a.blog", ["mark","simon"] ); t( "Parent Class Selector", "p .blog", ["mark","simon"] );}); |
fragments.reverse().each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild); }).bind(this)); | setTimeout(function() {content.evalScripts()}, 10); | fragments.reverse().each((function(fragment) { this.element.insertBefore(fragment, this.element.firstChild); }).bind(this)); |
test("expressions - id", function() { expect(5); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); | test("expressions - pseudo (:) selctors", function() { expect(30); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); t( "Only Child", "a:only-child", ["simon1","anchor1","yahoo","anchor2"] ); t( "Empty", "ul:empty", ["firstUL"] ); t( "Enabled UI Element", "input:enabled... | test("expressions - id", function() { expect(5); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL/*", [] );}); |
t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL/*", [] ); | t( "nth Element", "p:nth(1)", ["ap"] ); t( "First Element", "p:first", ["firstp"] ); t( "Last Element", "p:last", ["first"] ); t( "Even Elements", "p:even", ["firstp","sndp","sap"] ); t( "Odd Elements", "p:odd", ["ap","en","first"] ); t( "Position Equals", "p:eq(1)", ["ap"] ); t( "Position Greater Than", "p:gt(0)", ["a... | test("expressions - id", function() { expect(5); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL/*", [] );}); |
test("expressions - multiple", function() { | test("expressions - class", function() { | test("expressions - multiple", function() { expect(4); t( "Comma Support", "a.blog, div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog , div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog ,div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog,div", ["mark","simon","main","fo... |
t( "Comma Support", "a.blog, div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog , div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog ,div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog,div", ["mark","simon","main","foo"] ); | t( "Class Selector", ".blog", ["mark","simon"] ); t( "Class Selector", ".blog.link", ["simon"] ); t( "Class Selector w/ Element", "a.blog", ["mark","simon"] ); t( "Parent Class Selector", "p .blog", ["mark","simon"] ); | test("expressions - multiple", function() { expect(4); t( "Comma Support", "a.blog, div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog , div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog ,div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog,div", ["mark","simon","main","fo... |
test("expressions - class", function() { expect(4); t( "Class Selector", ".blog", ["mark","simon"] ); t( "Class Selector", ".blog.link", ["simon"] ); t( "Class Selector w/ Element", "a.blog", ["mark","simon"] ); t( "Parent Class Selector", "p .blog", ["mark","simon"] ); | test("expressions - basic xpath", function() { expect(14); ok( jQuery.find(" t( "All Div Elements", " t( "Absolute Path", "/html/body", ["body"] ); t( "Absolute Path w/ *", "/* /body", ["body"] ); t( "Long Absolute Path", "/html/body/dl/div/div/p", ["sndp","en","sap"] ); t( "Absolute and Relative Paths", "/html t( "All... | test("expressions - class", function() { expect(4); t( "Class Selector", ".blog", ["mark","simon"] ); t( "Class Selector", ".blog.link", ["simon"] ); t( "Class Selector w/ Element", "a.blog", ["mark","simon"] ); t( "Parent Class Selector", "p .blog", ["mark","simon"] );}); |
jQuery.ajax( "GET", url, null, function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); }); | new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(','); for ( var i = 0; i < e.length; i++ ) new 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) ); }); |
new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(","); for ( var i = 0; i < e.length; i++ ) new function(){ | for ( var i = 0; i < e.length; i++ ) new function(){ | new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(","); for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; };}; |
}; | new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(","); for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; };}; | |
$.get("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if load works without callback'); | 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() == 'ba... | $.get("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if load works without callback'); start(); }); |
}); | $.get("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if load works without callback'); start(); }); | |
new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(","); for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; }; }; | jQuery.getScript( this.src, function() {} ); | new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(","); for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; };}; |
$('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); }); | test("synchronous request", function() { ok( /^{ "data"/.test( $.ajax({url: "data/json.php", async: false}).responseText ), "check returned text" ); }); | $('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); }); |
self.html(res.responseText).find("script").each(function(){ try { eval( this.text || this.textContent || this.innerHTML || ""); } catch(e){} }); | $.ajax( "GET", url, null, function(r) { if ( callback ) callback( $.httpData(r,type) ); }); | self.html(res.responseText).find("script").each(function(){ try { eval( this.text || this.textContent || this.innerHTML || ""); } catch(e){} }); |
fx[c] = function(a,b){ return new fx(a,b,c.toLowerCase(),c);}; | return this.each(function(){ new fx.Resize(this,o).hide("height"); }); | fx[c] = function(a,b){ return new fx(a,b,c.toLowerCase(),c);}; |
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() == 'ba... | $('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); | 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() ... |
}); | 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() ... | |
setTimeout(function() { openDialog(chrome, "_blank", flags, href, null, null, postData); }, 10); | setTimeout(function() { gURLBar.focus(); }, 0); | setTimeout(function() { openDialog(chrome, "_blank", flags, href, null, null, postData); }, 10); |
cur_dates.forEach (function (dateToRemove) { dates = dates.filter(function (d) { return d.compare(dateToRemove) != 0; }); }); | this.mExceptions.forEach(function(ex) { var dtstart = ex.item.getProperty("DTSTART"); var dateToReturn; if (aReturnRIDs) dateToReturn = ex.id; else dateToReturn = dtstart; if ((!aRangeStart || aRangeStart.compare(dtstart) <= 0) && (!aRangeEnd || aRangeEnd.compare(dtstart) > 0)) { dates.push(dateToReturn); return; } ... | cur_dates.forEach (function (dateToRemove) { dates = dates.filter(function (d) { return d.compare(dateToRemove) != 0; }); }); |
return this.domManip(arguments, true, 1, function(a){ this.appendChild( a ); | return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) b = b.firstChild; b.appendChild( this ); | return this.domManip(arguments, true, 1, function(a){ this.appendChild( a ); }); |
} | }; | new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(','); 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); | synchronize(function() { blocking = true; $.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.creat... | |
setTimeout(function() { openDialog(chrome, "_blank", flags, url); }, 10); | setTimeout(function() { openDialog(chrome, "_blank", flags, href, null, null, postData); }, 10); | setTimeout(function() { openDialog(chrome, "_blank", flags, url); }, 10); |
$("div.more,div.short",this.parentNode.parentNode).toggle().find("div.desc",function(){ | $("div.more,div.short",this.parentNode.parentNode).toggle('slow').find("div.desc",function(){ | $("div.more,div.short",this.parentNode.parentNode).toggle().find("div.desc",function(){ $(this).html( $(this).html().replace(/\n\n/g, "<br/><br/>") ); }); |
setTimeout(function(field, data, evt) { field.value = data; field.onTextEntered(evt); }, 0, field, data, aEvent); | setTimeout(function(aTabElt) { gBrowser.selectedTab = aTabElt; }, 0, gBrowser.addTab(url)); | setTimeout(function(field, data, evt) { field.value = data; field.onTextEntered(evt); }, 0, field, data, aEvent); |
jQuery.prototype[o] = function(f){ return this.bind(o, f); }; | jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; | jQuery.prototype[o] = function(f){ return this.bind(o, f); }; |
return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) b = b.firstChild; b.appendChild( this ); | return this.domManip(arguments, true, 1, function(a){ this.appendChild( a ); | return this.each(function(){ // Clone the structure that we're using to wrap var b = a[0].cloneNode(true); // Insert it before the element to be wrapped this.parentNode.insertBefore( b, this ); // Find he deepest point in the wrap structure while ( b.firstChild ) b = b.firstChild; // Move th... |
jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); | jQuery.fn[o] = function(f, amount){ return f ? this.bind(o, f, amount) : this.trigger(o); | jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; |
.find("div.desc",function(){ | .find("div.desc").each(function(){ | .find("div.desc",function(){ $(this).html( $(this).html().replace(/\n\n/g, "<br/><br/>") ); }) |
}) | }).end() | .find("div.desc",function(){ $(this).html( $(this).html().replace(/\n\n/g, "<br/><br/>") ); }) |
$.eval( this.text || this.textContent || this.innerHTML ); | $.eval( this.text || this.textContent || this.innerHTML || ""); | self.html(h).find("script").each(function(){ try { $.eval( this.text || this.textContent || this.innerHTML ); } catch(e){} }); |
$.xml(mth, url, $.param(this.vars), function(r) { eval(r.responseText); }); | }).submit(function(e){ e.preventDefault(); $(this).ajaxSubmit(target, post_cb, pre_cb); return false; }); | $.xml(mth, url, $.param(this.vars), function(r) { eval(r.responseText); }); |
} | }; | new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(','); for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; }} |
var d = $.getCSS(this,"display"); if ( d == "none" || d === '' ) $(this).show(); else $(this).hide(); }); | this.style.display = this.oldblock ? this.oldblock : ""; if ( $.css(this,"display") == "none" ) this.style.display = "block"; }); | return this.each(function(){ var d = $.getCSS(this,"display"); if ( d == "none" || d === '' ) $(this).show(); else $(this).hide(); }); |
test("expressions - child and adjacent", function() { expect(14); t( "Child", "p > a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p> a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p >a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p>a", ["simon1"... | test("expressions - multiple", function() { expect(4); t( "Comma Support", "a.blog, div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog , div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog ,div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog,div", ["mark","simon","main","fo... | test("expressions - child and adjacent", function() { expect(14); t( "Child", "p > a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p> a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p >a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p>a", ["simon1"... |
test("expressions - multiple", function() { expect(4); t( "Comma Support", "a.blog, div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog , div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog ,div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog,div", ["mark","simon","main","fo... | test("val()", function() { expect(2); ok( $("#text1").val() == "Test", "Check for value of input element" ); ok( !$("#text1").val() == "", "Check for value of input element" ); | test("expressions - multiple", function() { expect(4); t( "Comma Support", "a.blog, div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog , div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog ,div", ["mark","simon","main","foo"] ); t( "Comma Support", "a.blog,div", ["mark","simon","main","fo... |
test("expressions - attributes", function() { expect(16); t( "Attribute Exists", "a[@title]", ["google"] ); t( "Attribute Exists", "*[@title]", ["google"] ); t( "Attribute Exists", "[@title]", ["google"] ); t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] ); t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1... | test("expressions - child and adjacent", function() { expect(14); t( "Child", "p > a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p> a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p >a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p>a", ["simon1"... | test("expressions - attributes", function() { expect(16); t( "Attribute Exists", "a[@title]", ["google"] ); t( "Attribute Exists", "*[@title]", ["google"] ); t( "Attribute Exists", "[@title]", ["google"] ); t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] ); t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1... |
test("expressions - child and adjacent", function() { expect(14); t( "Child", "p > a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p> a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p >a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p>a", ["simon1"... | test("val(String)", function() { expect(2); document.getElementById('text1').value = "bla"; ok( $("#text1").val() == "bla", "Check for modified value of input element" ); $("#text1").val('test'); ok ( document.getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" ); | test("expressions - child and adjacent", function() { expect(14); t( "Child", "p > a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p> a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p >a", ["simon1","google","groups","mark","yahoo","simon"] ); t( "Child", "p>a", ["simon1"... |
test("expressions - pseudo (:) selctors", function() { expect(30); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); t( "Only Child", "a:only-child", ["simon1","anchor1","yahoo","anchor2"] ); t( "Empty", "ul:empty", ["firstUL"] ); t( "Enabled UI Element", "input:enabled... | test("expressions - attributes", function() { expect(16); t( "Attribute Exists", "a[@title]", ["google"] ); t( "Attribute Exists", "*[@title]", ["google"] ); t( "Attribute Exists", "[@title]", ["google"] ); | test("expressions - pseudo (:) selctors", function() { expect(30); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); t( "Only Child", "a:only-child", ["simon1","anchor1","yahoo","anchor2"] ); t( "Empty", "ul:empty", ["firstUL"] ); t( "Enabled UI Element", "input:enabled... |
t( "nth Element", "p:nth(1)", ["ap"] ); t( "First Element", "p:first", ["firstp"] ); t( "Last Element", "p:last", ["first"] ); t( "Even Elements", "p:even", ["firstp","sndp","sap"] ); t( "Odd Elements", "p:odd", ["ap","en","first"] ); t( "Position Equals", "p:eq(1)", ["ap"] ); t( "Position Greater Than", "p:gt(0)", ["a... | t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] ); t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1"] ); t( "Attribute Equals", "a[@rel=bookmark]", ["simon1"] ); t( "Multiple Attribute Equals", "input[@type='hidden'],input[@type='radio']", ["hidden1","radio1","radio2"] ); t( "Multiple Attribute Equals", "i... | test("expressions - pseudo (:) selctors", function() { expect(30); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); t( "Only Child", "a:only-child", ["simon1","anchor1","yahoo","anchor2"] ); t( "Empty", "ul:empty", ["firstUL"] ); t( "Enabled UI Element", "input:enabled... |
t( "Form element :input", ":input", ["text1", "text2", "radio1", "radio2", "check1", "check2", "hidden1", "hidden2", "name", "button", "area1", "select1", "select2", "select3"] ); t( "Form element :radio", ":radio", ["radio1", "radio2"] ); t( "Form element :checkbox", ":checkbox", ["check1", "check2"] ); t( "Form eleme... | t( "Attribute Begins With", "a[@href ^= 'http: t( "Attribute Ends With", "a[@href $= 'org/']", ["mark"] ); t( "Attribute Contains", "a[@href *= 'google']", ["google","groups"] ); t( "Grouped Form Elements", "input[@name='foo[bar]']", ["hidden2"] ); t( ":not() Existing attribute", "select:not([@multiple])", ["select1"... | test("expressions - pseudo (:) selctors", function() { expect(30); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); t( "Only Child", "a:only-child", ["simon1","anchor1","yahoo","anchor2"] ); t( "Empty", "ul:empty", ["firstUL"] ); t( "Enabled UI Element", "input:enabled... |
this.set(this.select(function(className) { return className != classNameToRemove; })); | fragments.each((function(fragment) { this.element.parentNode.insertBefore(fragment, this.element.nextSibling); }).bind(this)); | this.set(this.select(function(className) { return className != classNameToRemove; })); |
test("expressions - attributes", function() { expect(16); t( "Attribute Exists", "a[@title]", ["google"] ); t( "Attribute Exists", "*[@title]", ["google"] ); t( "Attribute Exists", "[@title]", ["google"] ); t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] ); t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1... | test("html(String)", function() { expect(1); var div = $("div"); div.html("<b>test</b>"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).childNodes.length == 0 ) pass = false; } ok( pass, "Set HTML" ); | test("expressions - attributes", function() { expect(16); t( "Attribute Exists", "a[@title]", ["google"] ); t( "Attribute Exists", "*[@title]", ["google"] ); t( "Attribute Exists", "[@title]", ["google"] ); t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] ); t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1... |
test("expressions - basic xpath", function() { expect(14); ok( jQuery.find(" t( "All Div Elements", " t( "Absolute Path", "/html/body", ["body"] ); t( "Absolute Path w/ *", "/* /body", ["body"] ); t( "Long Absolute Path", "/html/body/dl/div/div/p", ["sndp","en","sap"] ); t( "Absolute and Relative Paths", "/html t( "All... | test("expressions - pseudo (:) selctors", function() { expect(30); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); t( "Only Child", "a:only-child", ["simon1","anchor1","yahoo","anchor2"] ); t( "Empty", "ul:empty", ["firstUL"] ); t( "Enabled UI Element", "input:enabled... | test("expressions - basic xpath", function() { expect(14); ok( jQuery.find("//*").length >= 30, "All Elements (//*)" ); t( "All Div Elements", "//div", ["main","foo"] ); t( "Absolute Path", "/html/body", ["body"] ); t( "Absolute Path w/ *", "/* /body", ["body"] ); t( "Long Absolute Path", "/html/body/dl/div/div/p", ["s... |
test("expressions - pseudo (:) selctors", function() { expect(30); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); t( "Only Child", "a:only-child", ["simon1","anchor1","yahoo","anchor2"] ); t( "Empty", "ul:empty", ["firstUL"] ); t( "Enabled UI Element", "input:enabled... | test("id()", function() { expect(3); ok( $(document.getElementById('main')).id() == "main", "Check for id" ); ok( $("#foo").id() == "foo", "Check for id" ); ok( !$("head").id(), "Check for id" ); | test("expressions - pseudo (:) selctors", function() { expect(30); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); t( "Only Child", "a:only-child", ["simon1","anchor1","yahoo","anchor2"] ); t( "Empty", "ul:empty", ["firstUL"] ); t( "Enabled UI Element", "input:enabled... |
test("val()", function() { expect(2); ok( $("#text1").val() == "Test", "Check for value of input element" ); ok( !$("#text1").val() == "", "Check for value of input element" ); | test("expressions - basic xpath", function() { expect(14); ok( jQuery.find(" t( "All Div Elements", " t( "Absolute Path", "/html/body", ["body"] ); t( "Absolute Path w/ *", "/* /body", ["body"] ); t( "Long Absolute Path", "/html/body/dl/div/div/p", ["sndp","en","sap"] ); t( "Absolute and Relative Paths", "/html t( "All... | test("val()", function() { expect(2); ok( $("#text1").val() == "Test", "Check for value of input element" ); ok( !$("#text1").val() == "", "Check for value of input element" );}); |
test("expressions - basic xpath", function() { expect(14); ok( jQuery.find(" t( "All Div Elements", " t( "Absolute Path", "/html/body", ["body"] ); t( "Absolute Path w/ *", "/* /body", ["body"] ); t( "Long Absolute Path", "/html/body/dl/div/div/p", ["sndp","en","sap"] ); t( "Absolute and Relative Paths", "/html t( "All... | test("title()", function() { expect(2); ok( $(document.getElementById('google')).title() == "Google!", "Check for title" ); ok( !$("#yahoo").title(), "Check for title" ); | test("expressions - basic xpath", function() { expect(14); ok( jQuery.find("//*").length >= 30, "All Elements (//*)" ); t( "All Div Elements", "//div", ["main","foo"] ); t( "Absolute Path", "/html/body", ["body"] ); t( "Absolute Path w/ *", "/* /body", ["body"] ); t( "Long Absolute Path", "/html/body/dl/div/div/p", ["s... |
test("val(String)", function() { | test("val()", function() { | test("val(String)", function() { expect(2); document.getElementById('text1').value = "bla"; ok( $("#text1").val() == "bla", "Check for modified value of input element" ); $("#text1").val('test'); ok ( document.getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" );}); |
document.getElementById('text1').value = "bla"; ok( $("#text1").val() == "bla", "Check for modified value of input element" ); $("#text1").val('test'); ok ( document.getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" ); | ok( $("#text1").val() == "Test", "Check for value of input element" ); ok( !$("#text1").val() == "", "Check for value of input element" ); | test("val(String)", function() { expect(2); document.getElementById('text1').value = "bla"; ok( $("#text1").val() == "bla", "Check for modified value of input element" ); $("#text1").val('test'); ok ( document.getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" );}); |
test("val()", function() { expect(2); ok( $("#text1").val() == "Test", "Check for value of input element" ); ok( !$("#text1").val() == "", "Check for value of input 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("val()", function() { expect(2); ok( $("#text1").val() == "Test", "Check for value of input element" ); ok( !$("#text1").val() == "", "Check for value of input element" );}); |
test("html(String)", function() { expect(1); var div = $("div"); div.html("<b>test</b>"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).childNodes.length == 0 ) pass = false; } ok( pass, "Set HTML" ); | test("val(String)", function() { expect(2); document.getElementById('text1').value = "bla"; ok( $("#text1").val() == "bla", "Check for modified value of input element" ); $("#text1").val('test'); ok ( document.getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" ); | test("html(String)", function() { expect(1); var div = $("div"); div.html("<b>test</b>"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).childNodes.length == 0 ) pass = false; } ok( pass, "Set HTML" );}); |
test("val(String)", function() { expect(2); document.getElementById('text1').value = "bla"; ok( $("#text1").val() == "bla", "Check for modified value of input element" ); $("#text1").val('test'); ok ( document.getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" ); | 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 sibl... | test("val(String)", function() { expect(2); document.getElementById('text1').value = "bla"; ok( $("#text1").val() == "bla", "Check for modified value of input element" ); $("#text1").val('test'); ok ( document.getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" );}); |
test("id()", function() { expect(3); ok( $(document.getElementById('main')).id() == "main", "Check for id" ); ok( $("#foo").id() == "foo", "Check for id" ); ok( !$("head").id(), "Check for id" ); | test("html(String)", function() { expect(1); var div = $("div"); div.html("<b>test</b>"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).childNodes.length == 0 ) pass = false; } ok( pass, "Set HTML" ); | test("id()", function() { expect(3); ok( $(document.getElementById('main')).id() == "main", "Check for id" ); ok( $("#foo").id() == "foo", "Check for id" ); ok( !$("head").id(), "Check for id" );}); |
test("html(String)", function() { expect(1); var div = $("div"); div.html("<b>test</b>"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).childNodes.length == 0 ) pass = false; } ok( pass, "Set HTML" ); | 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("html(String)", function() { expect(1); var div = $("div"); div.html("<b>test</b>"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).childNodes.length == 0 ) pass = false; } ok( pass, "Set HTML" );}); |
test("title()", function() { expect(2); ok( $(document.getElementById('google')).title() == "Google!", "Check for title" ); ok( !$("#yahoo").title(), "Check for title" ); | test("id()", function() { expect(3); ok( $(document.getElementById('main')).id() == "main", "Check for id" ); ok( $("#foo").id() == "foo", "Check for id" ); ok( !$("head").id(), "Check for id" ); | test("title()", function() { expect(2); ok( $(document.getElementById('google')).title() == "Google!", "Check for title" ); ok( !$("#yahoo").title(), "Check for title" );}); |
test("id()", function() { expect(3); ok( $(document.getElementById('main')).id() == "main", "Check for id" ); ok( $("#foo").id() == "foo", "Check for id" ); ok( !$("head").id(), "Check for id" ); | 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("id()", function() { expect(3); ok( $(document.getElementById('main')).id() == "main", "Check for id" ); ok( $("#foo").id() == "foo", "Check for id" ); ok( !$("head").id(), "Check for id" );}); |
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("title()", function() { expect(2); ok( $(document.getElementById('google')).title() == "Google!", "Check for title" ); ok( !$("#yahoo").title(), "Check for title" ); | 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("title()", function() { expect(2); ok( $(document.getElementById('google')).title() == "Google!", "Check for title" ); ok( !$("#yahoo").title(), "Check for title" ); }); | div.show().each(function(){ if ( this.style.display == "none" ) pass = false; }); | test("title()", function() { expect(2); ok( $(document.getElementById('google')).title() == "Google!", "Check for title" ); ok( !$("#yahoo").title(), "Check for title" );}); |
jQuery.ajax( "POST", url, jQuery.param(data), function(r) { if ( callback ) callback( jQuery.httpData(r,type) ); }); | for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; 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) ); }); |
if (!n && p == 'OPTGROUP' && (par = par.parentNode)) n = par.name; | if (!n) n = (p == 'OPTGROUP') ? par.parentNode.name : par.name; | $('*', 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... |
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ | jQuery.fn[o] = function(f){ | for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; }; |
}; | for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; }; | |
var n = this.name || par.name; | var n = this.name; | $('*', 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... |
new $.fx.Opacity(this,o).hide(); | new $.fx.Opacity(this,o,1).hide(); | return a ? this.each(function(){ new $.fx.Opacity(this,o).hide(); }) : this._hide(); |
test("load(String, Object, Function) - check scripts", function() { expect(6); stop(); window.foobar = undefined; window.foo = 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... | $('#first').load('data/test.html', function() { | test("load(String, Object, Function) - check scripts", function() { expect(6); stop(); window.foobar = undefined; window.foo = 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... |
ok( foo == "foo", 'Check if script was evaluated after load' ); | ok( testFoo == "foo", 'Check if script was evaluated after load' ); | test("load(String, Object, Function) - check scripts", function() { expect(6); stop(); window.foobar = undefined; window.foo = 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... |
}); | test("load(String, Object, Function) - check scripts", function() { expect(6); stop(); window.foobar = undefined; window.foo = 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... | |
for ( var i = 0; i < e.length; i++ ) new function(){ | new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(","); for ( var i = 0; i < e.length; i++ ) new function(){ | for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; }; |
}; | for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; }; | |
$('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; } | $.ajax( "POST", url, $.param(data), function(r) { if ( callback ) callback( $.httpData(r,type) ); | $('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; ... |
this._each(function(value) { try { iterator(value, index++); } catch (e) { if (e != $continue) throw e; } }); | return pairs.inject({}, function(params, pairString) { var pair = pairString.split('='); params[pair[0]] = pair[1]; return params; }); | this._each(function(value) { try { iterator(value, index++); } catch (e) { if (e != $continue) throw e; } }); |
for(var i in fx.fn){(function(){ var j = fx.fn[i]; 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).hide(); }) : this._hide(); | for(var i in fx.fn){(function(){ var j = fx.fn[i]; z[j] = function(a,b){ if(c(a,b,"height")) h[j](); if(c(a,b,"width")) w[j](); }; })()} |
$('#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("load(String, Object, Function) - inject without callback", function() { expect(1); stop(); $('#first').load("data/name.php"); }); | $('#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); }); |
setTimeout(function(aTabElt) { gBrowser.selectedTab = aTabElt; }, 0, gBrowser.addTab(aUrl, aReferrer, aCharset, aPostData)); | setTimeout(function() { openDialog(chrome, "_blank", flags, href, null, null, postData); }, 10); | setTimeout(function(aTabElt) { gBrowser.selectedTab = aTabElt; }, 0, gBrowser.addTab(aUrl, aReferrer, aCharset, aPostData)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.