From: Ariel Flesler Date: Wed, 28 May 2008 23:18:25 +0000 (+0000) Subject: test runner: the changes are: X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=9e48649729a5d4cd9ce52bcba067ba33a562cb4b test runner: the changes are: - Replaced all the $ for jQuery in the tests and suite. - Added a noConflict to testrunner.js. - Modified the test for noConflict() so that it still work. - Added jQuery 1.2.1 and 1.2.3 to otherlibs. --- diff --git a/test/data/testrunner.js b/test/data/testrunner.js index d4fdcf5..821799b 100644 --- a/test/data/testrunner.js +++ b/test/data/testrunner.js @@ -1,3 +1,5 @@ +jQuery.noConflict(); // Allow the test to run with other libs or jQuery's. + var _config = { fixture: null, Test: [], @@ -14,12 +16,12 @@ var _config = { }; _config.filters = location.search.length > 1 && //restrict modules/tests by get parameters - $.map( location.search.slice(1).split('&'), decodeURIComponent ); + jQuery.map( location.search.slice(1).split('&'), decodeURIComponent ); var isLocal = !!(window.location.protocol == 'file:'); -$(function() { - $('#userAgent').html(navigator.userAgent); +jQuery(function() { + jQuery('#userAgent').html(navigator.userAgent); runTest(); }); @@ -81,15 +83,15 @@ function runTest() { _config.blocking = false; var time = new Date(); _config.fixture = document.getElementById('main').innerHTML; - _config.ajaxSettings = $.ajaxSettings; + _config.ajaxSettings = jQuery.ajaxSettings; synchronize(function() { time = new Date() - time; - $("
").html(['

Tests completed in ', + jQuery("

").html(['

Tests completed in ', time, ' milliseconds.
', _config.stats.bad, ' tests of ', _config.stats.all, ' failed.

'] .join('')) .appendTo("body"); - $("#banner").addClass(_config.stats.bad ? "fail" : "pass"); + jQuery("#banner").addClass(_config.stats.bad ? "fail" : "pass"); }); } @@ -154,11 +156,11 @@ function test(name, callback, nowait) { else n.style.display = "none"; }; - $(b).dblclick(function(event) { + jQuery(b).dblclick(function(event) { var target = jQuery(event.target).filter("strong").clone(); if ( target.length ) { target.children().remove(); - location.href = location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent($.trim(target.text())); + location.href = location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(jQuery.trim(target.text())); } }); li.appendChild( b ); @@ -184,14 +186,14 @@ function expect(asserts) { * Resets the test setup. Useful for tests that modify the DOM. */ function reset() { - $("#main").html( _config.fixture ); - $.event.global = {}; - $.ajaxSettings = $.extend({}, _config.ajaxSettings); + jQuery("#main").html( _config.fixture ); + jQuery.event.global = {}; + jQuery.ajaxSettings = jQuery.extend({}, _config.ajaxSettings); } /** * Asserts true. - * @example ok( $("a").size() > 5, "There must be at least 5 anchors" ); + * @example ok( jQuery("a").size() > 5, "There must be at least 5 anchors" ); */ function ok(a, msg) { _config.Test.push( [ !!a, msg ] ); diff --git a/test/index.html b/test/index.html index 558c0f7..0127c43 100644 --- a/test/index.html +++ b/test/index.html @@ -5,7 +5,12 @@ jQuery Test Suite - + diff --git a/test/otherlibs/jquery/1.2.1/jquery.js b/test/otherlibs/jquery/1.2.1/jquery.js new file mode 100644 index 0000000..d646859 --- /dev/null +++ b/test/otherlibs/jquery/1.2.1/jquery.js @@ -0,0 +1,11 @@ +/* + * jQuery 1.2.1 - New Wave Javascript + * + * Copyright (c) 2007 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ + * $Rev: 3353 $ + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(G(){9(1m E!="W")H w=E;H E=18.15=G(a,b){I 6 7u E?6.5N(a,b):1u E(a,b)};9(1m $!="W")H D=$;18.$=E;H u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;E.1b=E.3A={5N:G(c,a){c=c||U;9(1m c=="1M"){H m=u.2S(c);9(m&&(m[1]||!a)){9(m[1])c=E.4D([m[1]],a);J{H b=U.3S(m[3]);9(b)9(b.22!=m[3])I E().1Y(c);J{6[0]=b;6.K=1;I 6}J c=[]}}J I 1u E(a).1Y(c)}J 9(E.1n(c))I 1u E(U)[E.1b.2d?"2d":"39"](c);I 6.6v(c.1c==1B&&c||(c.4c||c.K&&c!=18&&!c.1y&&c[0]!=W&&c[0].1y)&&E.2h(c)||[c])},4c:"1.2.1",7Y:G(){I 6.K},K:0,21:G(a){I a==W?E.2h(6):6[a]},2o:G(a){H b=E(a);b.4Y=6;I b},6v:G(a){6.K=0;1B.3A.1a.16(6,a);I 6},N:G(a,b){I E.N(6,a,b)},4I:G(a){H b=-1;6.N(G(i){9(6==a)b=i});I b},1x:G(f,d,e){H c=f;9(f.1c==3X)9(d==W)I 6.K&&E[e||"1x"](6[0],f)||W;J{c={};c[f]=d}I 6.N(G(a){L(H b 1i c)E.1x(e?6.R:6,b,E.1e(6,c[b],e,a,b))})},17:G(b,a){I 6.1x(b,a,"3C")},2g:G(e){9(1m e!="5i"&&e!=S)I 6.4n().3g(U.6F(e));H t="";E.N(e||6,G(){E.N(6.3j,G(){9(6.1y!=8)t+=6.1y!=1?6.6x:E.1b.2g([6])})});I t},5m:G(b){9(6[0])E(b,6[0].3H).6u().3d(6[0]).1X(G(){H a=6;1W(a.1w)a=a.1w;I a}).3g(6);I 6},8m:G(a){I 6.N(G(){E(6).6q().5m(a)})},8d:G(a){I 6.N(G(){E(6).5m(a)})},3g:G(){I 6.3z(1q,Q,1,G(a){6.58(a)})},6j:G(){I 6.3z(1q,Q,-1,G(a){6.3d(a,6.1w)})},6g:G(){I 6.3z(1q,P,1,G(a){6.12.3d(a,6)})},50:G(){I 6.3z(1q,P,-1,G(a){6.12.3d(a,6.2q)})},2D:G(){I 6.4Y||E([])},1Y:G(t){H b=E.1X(6,G(a){I E.1Y(t,a)});I 6.2o(/[^+>] [^+>]/.14(t)||t.1g("..")>-1?E.4V(b):b)},6u:G(e){H f=6.1X(G(){I 6.67?E(6.67)[0]:6.4R(Q)});H d=f.1Y("*").4O().N(G(){9(6[F]!=W)6[F]=S});9(e===Q)6.1Y("*").4O().N(G(i){H c=E.M(6,"2P");L(H a 1i c)L(H b 1i c[a])E.1j.1f(d[i],a,c[a][b],c[a][b].M)});I f},1E:G(t){I 6.2o(E.1n(t)&&E.2W(6,G(b,a){I t.16(b,[a])})||E.3m(t,6))},5V:G(t){I 6.2o(t.1c==3X&&E.3m(t,6,Q)||E.2W(6,G(a){I(t.1c==1B||t.4c)?E.2A(a,t)<0:a!=t}))},1f:G(t){I 6.2o(E.1R(6.21(),t.1c==3X?E(t).21():t.K!=W&&(!t.11||E.11(t,"2Y"))?t:[t]))},3t:G(a){I a?E.3m(a,6).K>0:P},7c:G(a){I 6.3t("."+a)},3i:G(b){9(b==W){9(6.K){H c=6[0];9(E.11(c,"24")){H e=c.4Z,a=[],Y=c.Y,2G=c.O=="24-2G";9(e<0)I S;L(H i=2G?e:0,33=2G?e+1:Y.K;i<33;i++){H d=Y[i];9(d.26){H b=E.V.1h&&!d.9V["1Q"].9L?d.2g:d.1Q;9(2G)I b;a.1a(b)}}I a}J I 6[0].1Q.1p(/\\r/g,"")}}J I 6.N(G(){9(b.1c==1B&&/4k|5j/.14(6.O))6.2Q=(E.2A(6.1Q,b)>=0||E.2A(6.2H,b)>=0);J 9(E.11(6,"24")){H a=b.1c==1B?b:[b];E("9h",6).N(G(){6.26=(E.2A(6.1Q,a)>=0||E.2A(6.2g,a)>=0)});9(!a.K)6.4Z=-1}J 6.1Q=b})},4o:G(a){I a==W?(6.K?6[0].3O:S):6.4n().3g(a)},6H:G(a){I 6.50(a).28()},6E:G(i){I 6.2J(i,i+1)},2J:G(){I 6.2o(1B.3A.2J.16(6,1q))},1X:G(b){I 6.2o(E.1X(6,G(a,i){I b.2O(a,i,a)}))},4O:G(){I 6.1f(6.4Y)},3z:G(f,d,g,e){H c=6.K>1,a;I 6.N(G(){9(!a){a=E.4D(f,6.3H);9(g<0)a.8U()}H b=6;9(d&&E.11(6,"1I")&&E.11(a[0],"4m"))b=6.4l("1K")[0]||6.58(U.5B("1K"));E.N(a,G(){H a=c?6.4R(Q):6;9(!5A(0,a))e.2O(b,a)})})}};G 5A(i,b){H a=E.11(b,"1J");9(a){9(b.3k)E.3G({1d:b.3k,3e:P,1V:"1J"});J E.5f(b.2g||b.6s||b.3O||"");9(b.12)b.12.3b(b)}J 9(b.1y==1)E("1J",b).N(5A);I a}E.1k=E.1b.1k=G(){H c=1q[0]||{},a=1,2c=1q.K,5e=P;9(c.1c==8o){5e=c;c=1q[1]||{}}9(2c==1){c=6;a=0}H b;L(;a<2c;a++)9((b=1q[a])!=S)L(H i 1i b){9(c==b[i])6r;9(5e&&1m b[i]==\'5i\'&&c[i])E.1k(c[i],b[i]);J 9(b[i]!=W)c[i]=b[i]}I c};H F="15"+(1u 3D()).3B(),6p=0,5c={};E.1k({8a:G(a){18.$=D;9(a)18.15=w;I E},1n:G(a){I!!a&&1m a!="1M"&&!a.11&&a.1c!=1B&&/G/i.14(a+"")},4a:G(a){I a.2V&&!a.1G||a.37&&a.3H&&!a.3H.1G},5f:G(a){a=E.36(a);9(a){9(18.6l)18.6l(a);J 9(E.V.1N)18.56(a,0);J 3w.2O(18,a)}},11:G(b,a){I b.11&&b.11.27()==a.27()},1L:{},M:G(c,d,b){c=c==18?5c:c;H a=c[F];9(!a)a=c[F]=++6p;9(d&&!E.1L[a])E.1L[a]={};9(b!=W)E.1L[a][d]=b;I d?E.1L[a][d]:a},30:G(c,b){c=c==18?5c:c;H a=c[F];9(b){9(E.1L[a]){2E E.1L[a][b];b="";L(b 1i E.1L[a])1T;9(!b)E.30(c)}}J{2a{2E c[F]}29(e){9(c.53)c.53(F)}2E E.1L[a]}},N:G(a,b,c){9(c){9(a.K==W)L(H i 1i a)b.16(a[i],c);J L(H i=0,48=a.K;i<48;i++)9(b.16(a[i],c)===P)1T}J{9(a.K==W)L(H i 1i a)b.2O(a[i],i,a[i]);J L(H i=0,48=a.K,3i=a[0];i<48&&b.2O(3i,i,3i)!==P;3i=a[++i]){}}I a},1e:G(c,b,d,e,a){9(E.1n(b))b=b.2O(c,[e]);H f=/z-?4I|7T-?7Q|1r|69|7P-?1H/i;I b&&b.1c==4W&&d=="3C"&&!f.14(a)?b+"2T":b},1o:{1f:G(b,c){E.N((c||"").2l(/\\s+/),G(i,a){9(!E.1o.3K(b.1o,a))b.1o+=(b.1o?" ":"")+a})},28:G(b,c){b.1o=c!=W?E.2W(b.1o.2l(/\\s+/),G(a){I!E.1o.3K(c,a)}).66(" "):""},3K:G(t,c){I E.2A(c,(t.1o||t).3s().2l(/\\s+/))>-1}},2k:G(e,o,f){L(H i 1i o){e.R["3r"+i]=e.R[i];e.R[i]=o[i]}f.16(e,[]);L(H i 1i o)e.R[i]=e.R["3r"+i]},17:G(e,p){9(p=="1H"||p=="2N"){H b={},42,41,d=["7J","7I","7G","7F"];E.N(d,G(){b["7C"+6]=0;b["7B"+6+"5Z"]=0});E.2k(e,b,G(){9(E(e).3t(\':3R\')){42=e.7A;41=e.7w}J{e=E(e.4R(Q)).1Y(":4k").5W("2Q").2D().17({4C:"1P",2X:"4F",19:"2Z",7o:"0",1S:"0"}).5R(e.12)[0];H a=E.17(e.12,"2X")||"3V";9(a=="3V")e.12.R.2X="7g";42=e.7e;41=e.7b;9(a=="3V")e.12.R.2X="3V";e.12.3b(e)}});I p=="1H"?42:41}I E.3C(e,p)},3C:G(h,j,i){H g,2w=[],2k=[];G 3n(a){9(!E.V.1N)I P;H b=U.3o.3Z(a,S);I!b||b.4y("3n")==""}9(j=="1r"&&E.V.1h){g=E.1x(h.R,"1r");I g==""?"1":g}9(j.1t(/4u/i))j=y;9(!i&&h.R[j])g=h.R[j];J 9(U.3o&&U.3o.3Z){9(j.1t(/4u/i))j="4u";j=j.1p(/([A-Z])/g,"-$1").2p();H d=U.3o.3Z(h,S);9(d&&!3n(h))g=d.4y(j);J{L(H a=h;a&&3n(a);a=a.12)2w.4w(a);L(a=0;a<2w.K;a++)9(3n(2w[a])){2k[a]=2w[a].R.19;2w[a].R.19="2Z"}g=j=="19"&&2k[2w.K-1]!=S?"2s":U.3o.3Z(h,S).4y(j)||"";L(a=0;a<2k.K;a++)9(2k[a]!=S)2w[a].R.19=2k[a]}9(j=="1r"&&g=="")g="1"}J 9(h.3Q){H f=j.1p(/\\-(\\w)/g,G(m,c){I c.27()});g=h.3Q[j]||h.3Q[f];9(!/^\\d+(2T)?$/i.14(g)&&/^\\d/.14(g)){H k=h.R.1S;H e=h.4v.1S;h.4v.1S=h.3Q.1S;h.R.1S=g||0;g=h.R.71+"2T";h.R.1S=k;h.4v.1S=e}}I g},4D:G(a,e){H r=[];e=e||U;E.N(a,G(i,d){9(!d)I;9(d.1c==4W)d=d.3s();9(1m d=="1M"){d=d.1p(/(<(\\w+)[^>]*?)\\/>/g,G(m,a,b){I b.1t(/^(70|6Z|6Y|9Q|4t|9N|9K|3a|9G|9E)$/i)?m:a+">"});H s=E.36(d).2p(),1s=e.5B("1s"),2x=[];H c=!s.1g("<9y")&&[1,"<24>",""]||!s.1g("<9w")&&[1,"<6T>",""]||s.1t(/^<(9u|1K|9t|9r|9p)/)&&[1,"<1I>",""]||!s.1g("<4m")&&[2,"<1I><1K>",""]||(!s.1g("<9m")||!s.1g("<9k"))&&[3,"<1I><1K><4m>",""]||!s.1g("<6Y")&&[2,"<1I><1K><6L>",""]||E.V.1h&&[1,"1s<1s>",""]||[0,"",""];1s.3O=c[1]+d+c[2];1W(c[0]--)1s=1s.5p;9(E.V.1h){9(!s.1g("<1I")&&s.1g("<1K")<0)2x=1s.1w&&1s.1w.3j;J 9(c[1]=="<1I>"&&s.1g("<1K")<0)2x=1s.3j;L(H n=2x.K-1;n>=0;--n)9(E.11(2x[n],"1K")&&!2x[n].3j.K)2x[n].12.3b(2x[n]);9(/^\\s/.14(d))1s.3d(e.6F(d.1t(/^\\s*/)[0]),1s.1w)}d=E.2h(1s.3j)}9(0===d.K&&(!E.11(d,"2Y")&&!E.11(d,"24")))I;9(d[0]==W||E.11(d,"2Y")||d.Y)r.1a(d);J r=E.1R(r,d)});I r},1x:G(c,d,a){H e=E.4a(c)?{}:E.5o;9(d=="26"&&E.V.1N)c.12.4Z;9(e[d]){9(a!=W)c[e[d]]=a;I c[e[d]]}J 9(E.V.1h&&d=="R")I E.1x(c.R,"9e",a);J 9(a==W&&E.V.1h&&E.11(c,"2Y")&&(d=="9d"||d=="9a"))I c.97(d).6x;J 9(c.37){9(a!=W){9(d=="O"&&E.11(c,"4t")&&c.12)6G"O 94 93\'t 92 91";c.90(d,a)}9(E.V.1h&&/6C|3k/.14(d)&&!E.4a(c))I c.4p(d,2);I c.4p(d)}J{9(d=="1r"&&E.V.1h){9(a!=W){c.69=1;c.1E=(c.1E||"").1p(/6O\\([^)]*\\)/,"")+(3I(a).3s()=="8S"?"":"6O(1r="+a*6A+")")}I c.1E?(3I(c.1E.1t(/1r=([^)]*)/)[1])/6A).3s():""}d=d.1p(/-([a-z])/8Q,G(z,b){I b.27()});9(a!=W)c[d]=a;I c[d]}},36:G(t){I(t||"").1p(/^\\s+|\\s+$/g,"")},2h:G(a){H r=[];9(1m a!="8P")L(H i=0,2c=a.K;i<2c;i++)r.1a(a[i]);J r=a.2J(0);I r},2A:G(b,a){L(H i=0,2c=a.K;i<2c;i++)9(a[i]==b)I i;I-1},1R:G(a,b){9(E.V.1h){L(H i=0;b[i];i++)9(b[i].1y!=8)a.1a(b[i])}J L(H i=0;b[i];i++)a.1a(b[i]);I a},4V:G(b){H r=[],2f={};2a{L(H i=0,6y=b.K;i<6y;i++){H a=E.M(b[i]);9(!2f[a]){2f[a]=Q;r.1a(b[i])}}}29(e){r=b}I r},2W:G(b,a,c){9(1m a=="1M")a=3w("P||G(a,i){I "+a+"}");H d=[];L(H i=0,4g=b.K;i<4g;i++)9(!c&&a(b[i],i)||c&&!a(b[i],i))d.1a(b[i]);I d},1X:G(c,b){9(1m b=="1M")b=3w("P||G(a){I "+b+"}");H d=[];L(H i=0,4g=c.K;i<4g;i++){H a=b(c[i],i);9(a!==S&&a!=W){9(a.1c!=1B)a=[a];d=d.8M(a)}}I d}});H v=8K.8I.2p();E.V={4s:(v.1t(/.+(?:8F|8E|8C|8B)[\\/: ]([\\d.]+)/)||[])[1],1N:/6w/.14(v),34:/34/.14(v),1h:/1h/.14(v)&&!/34/.14(v),35:/35/.14(v)&&!/(8z|6w)/.14(v)};H y=E.V.1h?"4h":"5h";E.1k({5g:!E.V.1h||U.8y=="8x",4h:E.V.1h?"4h":"5h",5o:{"L":"8w","8v":"1o","4u":y,5h:y,4h:y,3O:"3O",1o:"1o",1Q:"1Q",3c:"3c",2Q:"2Q",8u:"8t",26:"26",8s:"8r"}});E.N({1D:"a.12",8q:"15.4e(a,\'12\')",8p:"15.2I(a,2,\'2q\')",8n:"15.2I(a,2,\'4d\')",8l:"15.4e(a,\'2q\')",8k:"15.4e(a,\'4d\')",8j:"15.5d(a.12.1w,a)",8i:"15.5d(a.1w)",6q:"15.11(a,\'8h\')?a.8f||a.8e.U:15.2h(a.3j)"},G(i,n){E.1b[i]=G(a){H b=E.1X(6,n);9(a&&1m a=="1M")b=E.3m(a,b);I 6.2o(E.4V(b))}});E.N({5R:"3g",8c:"6j",3d:"6g",8b:"50",89:"6H"},G(i,n){E.1b[i]=G(){H a=1q;I 6.N(G(){L(H j=0,2c=a.K;j<2c;j++)E(a[j])[n](6)})}});E.N({5W:G(a){E.1x(6,a,"");6.53(a)},88:G(c){E.1o.1f(6,c)},87:G(c){E.1o.28(6,c)},86:G(c){E.1o[E.1o.3K(6,c)?"28":"1f"](6,c)},28:G(a){9(!a||E.1E(a,[6]).r.K){E.30(6);6.12.3b(6)}},4n:G(){E("*",6).N(G(){E.30(6)});1W(6.1w)6.3b(6.1w)}},G(i,n){E.1b[i]=G(){I 6.N(n,1q)}});E.N(["85","5Z"],G(i,a){H n=a.2p();E.1b[n]=G(h){I 6[0]==18?E.V.1N&&3y["84"+a]||E.5g&&38.33(U.2V["5a"+a],U.1G["5a"+a])||U.1G["5a"+a]:6[0]==U?38.33(U.1G["6n"+a],U.1G["6m"+a]):h==W?(6.K?E.17(6[0],n):S):6.17(n,h.1c==3X?h:h+"2T")}});H C=E.V.1N&&3x(E.V.4s)<83?"(?:[\\\\w*57-]|\\\\\\\\.)":"(?:[\\\\w\\82-\\81*57-]|\\\\\\\\.)",6k=1u 47("^>\\\\s*("+C+"+)"),6i=1u 47("^("+C+"+)(#)("+C+"+)"),6h=1u 47("^([#.]?)("+C+"*)");E.1k({55:{"":"m[2]==\'*\'||15.11(a,m[2])","#":"a.4p(\'22\')==m[2]",":":{80:"im[3]-0",2I:"m[3]-0==i",6E:"m[3]-0==i",3v:"i==0",3u:"i==r.K-1",6f:"i%2==0",6e:"i%2","3v-46":"a.12.4l(\'*\')[0]==a","3u-46":"15.2I(a.12.5p,1,\'4d\')==a","7X-46":"!15.2I(a.12.5p,2,\'4d\')",1D:"a.1w",4n:"!a.1w",7W:"(a.6s||a.7V||15(a).2g()||\'\').1g(m[3])>=0",3R:\'"1P"!=a.O&&15.17(a,"19")!="2s"&&15.17(a,"4C")!="1P"\',1P:\'"1P"==a.O||15.17(a,"19")=="2s"||15.17(a,"4C")=="1P"\',7U:"!a.3c",3c:"a.3c",2Q:"a.2Q",26:"a.26||15.1x(a,\'26\')",2g:"\'2g\'==a.O",4k:"\'4k\'==a.O",5j:"\'5j\'==a.O",54:"\'54\'==a.O",52:"\'52\'==a.O",51:"\'51\'==a.O",6d:"\'6d\'==a.O",6c:"\'6c\'==a.O",2r:\'"2r"==a.O||15.11(a,"2r")\',4t:"/4t|24|6b|2r/i.14(a.11)",3K:"15.1Y(m[3],a).K",7S:"/h\\\\d/i.14(a.11)",7R:"15.2W(15.32,G(1b){I a==1b.T;}).K"}},6a:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1u 47("^([:.#]*)("+C+"+)")],3m:G(a,c,b){H d,2b=[];1W(a&&a!=d){d=a;H f=E.1E(a,c,b);a=f.t.1p(/^\\s*,\\s*/,"");2b=b?c=f.r:E.1R(2b,f.r)}I 2b},1Y:G(t,o){9(1m t!="1M")I[t];9(o&&!o.1y)o=S;o=o||U;H d=[o],2f=[],3u;1W(t&&3u!=t){H r=[];3u=t;t=E.36(t);H l=P;H g=6k;H m=g.2S(t);9(m){H p=m[1].27();L(H i=0;d[i];i++)L(H c=d[i].1w;c;c=c.2q)9(c.1y==1&&(p=="*"||c.11.27()==p.27()))r.1a(c);d=r;t=t.1p(g,"");9(t.1g(" ")==0)6r;l=Q}J{g=/^([>+~])\\s*(\\w*)/i;9((m=g.2S(t))!=S){r=[];H p=m[2],1R={};m=m[1];L(H j=0,31=d.K;j<31;j++){H n=m=="~"||m=="+"?d[j].2q:d[j].1w;L(;n;n=n.2q)9(n.1y==1){H h=E.M(n);9(m=="~"&&1R[h])1T;9(!p||n.11.27()==p.27()){9(m=="~")1R[h]=Q;r.1a(n)}9(m=="+")1T}}d=r;t=E.36(t.1p(g,""));l=Q}}9(t&&!l){9(!t.1g(",")){9(o==d[0])d.44();2f=E.1R(2f,d);r=d=[o];t=" "+t.68(1,t.K)}J{H k=6i;H m=k.2S(t);9(m){m=[0,m[2],m[3],m[1]]}J{k=6h;m=k.2S(t)}m[2]=m[2].1p(/\\\\/g,"");H f=d[d.K-1];9(m[1]=="#"&&f&&f.3S&&!E.4a(f)){H q=f.3S(m[2]);9((E.V.1h||E.V.34)&&q&&1m q.22=="1M"&&q.22!=m[2])q=E(\'[@22="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.11(q,m[3]))?[q]:[]}J{L(H i=0;d[i];i++){H a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];9(a=="*"&&d[i].11.2p()=="5i")a="3a";r=E.1R(r,d[i].4l(a))}9(m[1]==".")r=E.4X(r,m[2]);9(m[1]=="#"){H e=[];L(H i=0;r[i];i++)9(r[i].4p("22")==m[2]){e=[r[i]];1T}r=e}d=r}t=t.1p(k,"")}}9(t){H b=E.1E(t,r);d=r=b.r;t=E.36(b.t)}}9(t)d=[];9(d&&o==d[0])d.44();2f=E.1R(2f,d);I 2f},4X:G(r,m,a){m=" "+m+" ";H c=[];L(H i=0;r[i];i++){H b=(" "+r[i].1o+" ").1g(m)>=0;9(!a&&b||a&&!b)c.1a(r[i])}I c},1E:G(t,r,h){H d;1W(t&&t!=d){d=t;H p=E.6a,m;L(H i=0;p[i];i++){m=p[i].2S(t);9(m){t=t.7O(m[0].K);m[2]=m[2].1p(/\\\\/g,"");1T}}9(!m)1T;9(m[1]==":"&&m[2]=="5V")r=E.1E(m[3],r,Q).r;J 9(m[1]==".")r=E.4X(r,m[2],h);J 9(m[1]=="["){H g=[],O=m[3];L(H i=0,31=r.K;i<31;i++){H a=r[i],z=a[E.5o[m[2]]||m[2]];9(z==S||/6C|3k|26/.14(m[2]))z=E.1x(a,m[2])||\'\';9((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1g(m[5])||O=="$="&&z.68(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1g(m[5])>=0)^h)g.1a(a)}r=g}J 9(m[1]==":"&&m[2]=="2I-46"){H e={},g=[],14=/(\\d*)n\\+?(\\d*)/.2S(m[3]=="6f"&&"2n"||m[3]=="6e"&&"2n+1"||!/\\D/.14(m[3])&&"n+"+m[3]||m[3]),3v=(14[1]||1)-0,d=14[2]-0;L(H i=0,31=r.K;i<31;i++){H j=r[i],12=j.12,22=E.M(12);9(!e[22]){H c=1;L(H n=12.1w;n;n=n.2q)9(n.1y==1)n.4U=c++;e[22]=Q}H b=P;9(3v==1){9(d==0||j.4U==d)b=Q}J 9((j.4U+d)%3v==0)b=Q;9(b^h)g.1a(j)}r=g}J{H f=E.55[m[1]];9(1m f!="1M")f=E.55[m[1]][m[2]];f=3w("P||G(a,i){I "+f+"}");r=E.2W(r,f,h)}}I{r:r,t:t}},4e:G(b,c){H d=[];H a=b[c];1W(a&&a!=U){9(a.1y==1)d.1a(a);a=a[c]}I d},2I:G(a,e,c,b){e=e||1;H d=0;L(;a;a=a[c])9(a.1y==1&&++d==e)1T;I a},5d:G(n,a){H r=[];L(;n;n=n.2q){9(n.1y==1&&(!a||n!=a))r.1a(n)}I r}});E.1j={1f:G(g,e,c,h){9(E.V.1h&&g.4j!=W)g=18;9(!c.2u)c.2u=6.2u++;9(h!=W){H d=c;c=G(){I d.16(6,1q)};c.M=h;c.2u=d.2u}H i=e.2l(".");e=i[0];c.O=i[1];H b=E.M(g,"2P")||E.M(g,"2P",{});H f=E.M(g,"2t",G(){H a;9(1m E=="W"||E.1j.4T)I a;a=E.1j.2t.16(g,1q);I a});H j=b[e];9(!j){j=b[e]={};9(g.4S)g.4S(e,f,P);J g.7N("43"+e,f)}j[c.2u]=c;6.1Z[e]=Q},2u:1,1Z:{},28:G(d,c,b){H e=E.M(d,"2P"),2L,4I;9(1m c=="1M"){H a=c.2l(".");c=a[0]}9(e){9(c&&c.O){b=c.4Q;c=c.O}9(!c){L(c 1i e)6.28(d,c)}J 9(e[c]){9(b)2E e[c][b.2u];J L(b 1i e[c])9(!a[1]||e[c][b].O==a[1])2E e[c][b];L(2L 1i e[c])1T;9(!2L){9(d.4P)d.4P(c,E.M(d,"2t"),P);J d.7M("43"+c,E.M(d,"2t"));2L=S;2E e[c]}}L(2L 1i e)1T;9(!2L){E.30(d,"2P");E.30(d,"2t")}}},1F:G(d,b,e,c,f){b=E.2h(b||[]);9(!e){9(6.1Z[d])E("*").1f([18,U]).1F(d,b)}J{H a,2L,1b=E.1n(e[d]||S),4N=!b[0]||!b[0].2M;9(4N)b.4w(6.4M({O:d,2m:e}));b[0].O=d;9(E.1n(E.M(e,"2t")))a=E.M(e,"2t").16(e,b);9(!1b&&e["43"+d]&&e["43"+d].16(e,b)===P)a=P;9(4N)b.44();9(f&&f.16(e,b)===P)a=P;9(1b&&c!==P&&a!==P&&!(E.11(e,\'a\')&&d=="4L")){6.4T=Q;e[d]()}6.4T=P}I a},2t:G(d){H a;d=E.1j.4M(d||18.1j||{});H b=d.O.2l(".");d.O=b[0];H c=E.M(6,"2P")&&E.M(6,"2P")[d.O],3q=1B.3A.2J.2O(1q,1);3q.4w(d);L(H j 1i c){3q[0].4Q=c[j];3q[0].M=c[j].M;9(!b[1]||c[j].O==b[1]){H e=c[j].16(6,3q);9(a!==P)a=e;9(e===P){d.2M();d.3p()}}}9(E.V.1h)d.2m=d.2M=d.3p=d.4Q=d.M=S;I a},4M:G(c){H a=c;c=E.1k({},a);c.2M=G(){9(a.2M)a.2M();a.7L=P};c.3p=G(){9(a.3p)a.3p();a.7K=Q};9(!c.2m&&c.65)c.2m=c.65;9(E.V.1N&&c.2m.1y==3)c.2m=a.2m.12;9(!c.4K&&c.4J)c.4K=c.4J==c.2m?c.7H:c.4J;9(c.64==S&&c.63!=S){H e=U.2V,b=U.1G;c.64=c.63+(e&&e.2R||b.2R||0);c.7E=c.7D+(e&&e.2B||b.2B||0)}9(!c.3Y&&(c.61||c.60))c.3Y=c.61||c.60;9(!c.5F&&c.5D)c.5F=c.5D;9(!c.3Y&&c.2r)c.3Y=(c.2r&1?1:(c.2r&2?3:(c.2r&4?2:0)));I c}};E.1b.1k({3W:G(c,a,b){I c=="5Y"?6.2G(c,a,b):6.N(G(){E.1j.1f(6,c,b||a,b&&a)})},2G:G(d,b,c){I 6.N(G(){E.1j.1f(6,d,G(a){E(6).5X(a);I(c||b).16(6,1q)},c&&b)})},5X:G(a,b){I 6.N(G(){E.1j.28(6,a,b)})},1F:G(c,a,b){I 6.N(G(){E.1j.1F(c,a,6,Q,b)})},7x:G(c,a,b){9(6[0])I E.1j.1F(c,a,6[0],P,b)},25:G(){H a=1q;I 6.4L(G(e){6.4H=0==6.4H?1:0;e.2M();I a[6.4H].16(6,[e])||P})},7v:G(f,g){G 4G(e){H p=e.4K;1W(p&&p!=6)2a{p=p.12}29(e){p=6};9(p==6)I P;I(e.O=="4x"?f:g).16(6,[e])}I 6.4x(4G).5U(4G)},2d:G(f){5T();9(E.3T)f.16(U,[E]);J E.3l.1a(G(){I f.16(6,[E])});I 6}});E.1k({3T:P,3l:[],2d:G(){9(!E.3T){E.3T=Q;9(E.3l){E.N(E.3l,G(){6.16(U)});E.3l=S}9(E.V.35||E.V.34)U.4P("5S",E.2d,P);9(!18.7t.K)E(18).39(G(){E("#4E").28()})}}});E.N(("7s,7r,39,7q,6n,5Y,4L,7p,"+"7n,7m,7l,4x,5U,7k,24,"+"51,7j,7i,7h,3U").2l(","),G(i,o){E.1b[o]=G(f){I f?6.3W(o,f):6.1F(o)}});H x=P;G 5T(){9(x)I;x=Q;9(E.V.35||E.V.34)U.4S("5S",E.2d,P);J 9(E.V.1h){U.7f("<7d"+"7y 22=4E 7z=Q "+"3k=//:><\\/1J>");H a=U.3S("4E");9(a)a.62=G(){9(6.2C!="1l")I;E.2d()};a=S}J 9(E.V.1N)E.4B=4j(G(){9(U.2C=="5Q"||U.2C=="1l"){4A(E.4B);E.4B=S;E.2d()}},10);E.1j.1f(18,"39",E.2d)}E.1b.1k({39:G(g,d,c){9(E.1n(g))I 6.3W("39",g);H e=g.1g(" ");9(e>=0){H i=g.2J(e,g.K);g=g.2J(0,e)}c=c||G(){};H f="4z";9(d)9(E.1n(d)){c=d;d=S}J{d=E.3a(d);f="5P"}H h=6;E.3G({1d:g,O:f,M:d,1l:G(a,b){9(b=="1C"||b=="5O")h.4o(i?E("<1s/>").3g(a.40.1p(/<1J(.|\\s)*?\\/1J>/g,"")).1Y(i):a.40);56(G(){h.N(c,[a.40,b,a])},13)}});I 6},7a:G(){I E.3a(6.5M())},5M:G(){I 6.1X(G(){I E.11(6,"2Y")?E.2h(6.79):6}).1E(G(){I 6.2H&&!6.3c&&(6.2Q||/24|6b/i.14(6.11)||/2g|1P|52/i.14(6.O))}).1X(G(i,c){H b=E(6).3i();I b==S?S:b.1c==1B?E.1X(b,G(a,i){I{2H:c.2H,1Q:a}}):{2H:c.2H,1Q:b}}).21()}});E.N("5L,5K,6t,5J,5I,5H".2l(","),G(i,o){E.1b[o]=G(f){I 6.3W(o,f)}});H B=(1u 3D).3B();E.1k({21:G(d,b,a,c){9(E.1n(b)){a=b;b=S}I E.3G({O:"4z",1d:d,M:b,1C:a,1V:c})},78:G(b,a){I E.21(b,S,a,"1J")},77:G(c,b,a){I E.21(c,b,a,"45")},76:G(d,b,a,c){9(E.1n(b)){a=b;b={}}I E.3G({O:"5P",1d:d,M:b,1C:a,1V:c})},75:G(a){E.1k(E.59,a)},59:{1Z:Q,O:"4z",2z:0,5G:"74/x-73-2Y-72",6o:Q,3e:Q,M:S},49:{},3G:G(s){H f,2y=/=(\\?|%3F)/g,1v,M;s=E.1k(Q,s,E.1k(Q,{},E.59,s));9(s.M&&s.6o&&1m s.M!="1M")s.M=E.3a(s.M);9(s.1V=="4b"){9(s.O.2p()=="21"){9(!s.1d.1t(2y))s.1d+=(s.1d.1t(/\\?/)?"&":"?")+(s.4b||"5E")+"=?"}J 9(!s.M||!s.M.1t(2y))s.M=(s.M?s.M+"&":"")+(s.4b||"5E")+"=?";s.1V="45"}9(s.1V=="45"&&(s.M&&s.M.1t(2y)||s.1d.1t(2y))){f="4b"+B++;9(s.M)s.M=s.M.1p(2y,"="+f);s.1d=s.1d.1p(2y,"="+f);s.1V="1J";18[f]=G(a){M=a;1C();1l();18[f]=W;2a{2E 18[f]}29(e){}}}9(s.1V=="1J"&&s.1L==S)s.1L=P;9(s.1L===P&&s.O.2p()=="21")s.1d+=(s.1d.1t(/\\?/)?"&":"?")+"57="+(1u 3D()).3B();9(s.M&&s.O.2p()=="21"){s.1d+=(s.1d.1t(/\\?/)?"&":"?")+s.M;s.M=S}9(s.1Z&&!E.5b++)E.1j.1F("5L");9(!s.1d.1g("8g")&&s.1V=="1J"){H h=U.4l("9U")[0];H g=U.5B("1J");g.3k=s.1d;9(!f&&(s.1C||s.1l)){H j=P;g.9R=g.62=G(){9(!j&&(!6.2C||6.2C=="5Q"||6.2C=="1l")){j=Q;1C();1l();h.3b(g)}}}h.58(g);I}H k=P;H i=18.6X?1u 6X("9P.9O"):1u 6W();i.9M(s.O,s.1d,s.3e);9(s.M)i.5C("9J-9I",s.5G);9(s.5y)i.5C("9H-5x-9F",E.49[s.1d]||"9D, 9C 9B 9A 5v:5v:5v 9z");i.5C("X-9x-9v","6W");9(s.6U)s.6U(i);9(s.1Z)E.1j.1F("5H",[i,s]);H c=G(a){9(!k&&i&&(i.2C==4||a=="2z")){k=Q;9(d){4A(d);d=S}1v=a=="2z"&&"2z"||!E.6S(i)&&"3U"||s.5y&&E.6R(i,s.1d)&&"5O"||"1C";9(1v=="1C"){2a{M=E.6Q(i,s.1V)}29(e){1v="5k"}}9(1v=="1C"){H b;2a{b=i.5s("6P-5x")}29(e){}9(s.5y&&b)E.49[s.1d]=b;9(!f)1C()}J E.5r(s,i,1v);1l();9(s.3e)i=S}};9(s.3e){H d=4j(c,13);9(s.2z>0)56(G(){9(i){i.9q();9(!k)c("2z")}},s.2z)}2a{i.9o(s.M)}29(e){E.5r(s,i,S,e)}9(!s.3e)c();I i;G 1C(){9(s.1C)s.1C(M,1v);9(s.1Z)E.1j.1F("5I",[i,s])}G 1l(){9(s.1l)s.1l(i,1v);9(s.1Z)E.1j.1F("6t",[i,s]);9(s.1Z&&!--E.5b)E.1j.1F("5K")}},5r:G(s,a,b,e){9(s.3U)s.3U(a,b,e);9(s.1Z)E.1j.1F("5J",[a,s,e])},5b:0,6S:G(r){2a{I!r.1v&&9n.9l=="54:"||(r.1v>=6N&&r.1v<9j)||r.1v==6M||E.V.1N&&r.1v==W}29(e){}I P},6R:G(a,c){2a{H b=a.5s("6P-5x");I a.1v==6M||b==E.49[c]||E.V.1N&&a.1v==W}29(e){}I P},6Q:G(r,b){H c=r.5s("9i-O");H d=b=="6K"||!b&&c&&c.1g("6K")>=0;H a=d?r.9g:r.40;9(d&&a.2V.37=="5k")6G"5k";9(b=="1J")E.5f(a);9(b=="45")a=3w("("+a+")");I a},3a:G(a){H s=[];9(a.1c==1B||a.4c)E.N(a,G(){s.1a(3f(6.2H)+"="+3f(6.1Q))});J L(H j 1i a)9(a[j]&&a[j].1c==1B)E.N(a[j],G(){s.1a(3f(j)+"="+3f(6))});J s.1a(3f(j)+"="+3f(a[j]));I s.66("&").1p(/%20/g,"+")}});E.1b.1k({1A:G(b,a){I b?6.1U({1H:"1A",2N:"1A",1r:"1A"},b,a):6.1E(":1P").N(G(){6.R.19=6.3h?6.3h:"";9(E.17(6,"19")=="2s")6.R.19="2Z"}).2D()},1z:G(b,a){I b?6.1U({1H:"1z",2N:"1z",1r:"1z"},b,a):6.1E(":3R").N(G(){6.3h=6.3h||E.17(6,"19");9(6.3h=="2s")6.3h="2Z";6.R.19="2s"}).2D()},6J:E.1b.25,25:G(a,b){I E.1n(a)&&E.1n(b)?6.6J(a,b):a?6.1U({1H:"25",2N:"25",1r:"25"},a,b):6.N(G(){E(6)[E(6).3t(":1P")?"1A":"1z"]()})},9c:G(b,a){I 6.1U({1H:"1A"},b,a)},9b:G(b,a){I 6.1U({1H:"1z"},b,a)},99:G(b,a){I 6.1U({1H:"25"},b,a)},98:G(b,a){I 6.1U({1r:"1A"},b,a)},96:G(b,a){I 6.1U({1r:"1z"},b,a)},95:G(c,a,b){I 6.1U({1r:a},c,b)},1U:G(k,i,h,g){H j=E.6D(i,h,g);I 6[j.3L===P?"N":"3L"](G(){j=E.1k({},j);H f=E(6).3t(":1P"),3y=6;L(H p 1i k){9(k[p]=="1z"&&f||k[p]=="1A"&&!f)I E.1n(j.1l)&&j.1l.16(6);9(p=="1H"||p=="2N"){j.19=E.17(6,"19");j.2U=6.R.2U}}9(j.2U!=S)6.R.2U="1P";j.3M=E.1k({},k);E.N(k,G(c,a){H e=1u E.2j(3y,j,c);9(/25|1A|1z/.14(a))e[a=="25"?f?"1A":"1z":a](k);J{H b=a.3s().1t(/^([+-]=)?([\\d+-.]+)(.*)$/),1O=e.2b(Q)||0;9(b){H d=3I(b[2]),2i=b[3]||"2T";9(2i!="2T"){3y.R[c]=(d||1)+2i;1O=((d||1)/e.2b(Q))*1O;3y.R[c]=1O+2i}9(b[1])d=((b[1]=="-="?-1:1)*d)+1O;e.3N(1O,d,2i)}J e.3N(1O,a,"")}});I Q})},3L:G(a,b){9(E.1n(a)){b=a;a="2j"}9(!a||(1m a=="1M"&&!b))I A(6[0],a);I 6.N(G(){9(b.1c==1B)A(6,a,b);J{A(6,a).1a(b);9(A(6,a).K==1)b.16(6)}})},9f:G(){H a=E.32;I 6.N(G(){L(H i=0;i-8O?r:3I(E.17(6.T,6.1e))||0},3N:G(c,b,e){6.5u=(1u 3D()).3B();6.1O=c;6.2D=b;6.2i=e||6.2i||"2T";6.2v=6.1O;6.4q=6.4i=0;6.4r();H f=6;G t(){I f.2F()}t.T=6.T;E.32.1a(t);9(E.32.K==1){H d=4j(G(){H a=E.32;L(H i=0;i6.Y.2e+6.5u){6.2v=6.2D;6.4q=6.4i=1;6.4r();6.Y.3M[6.1e]=Q;H a=Q;L(H i 1i 6.Y.3M)9(6.Y.3M[i]!==Q)a=P;9(a){9(6.Y.19!=S){6.T.R.2U=6.Y.2U;6.T.R.19=6.Y.19;9(E.17(6.T,"19")=="2s")6.T.R.19="2Z"}9(6.Y.1z)6.T.R.19="2s";9(6.Y.1z||6.Y.1A)L(H p 1i 6.Y.3M)E.1x(6.T.R,p,6.Y.3P[p])}9(a&&E.1n(6.Y.1l))6.Y.1l.16(6.T);I P}J{H n=t-6.5u;6.4i=n/6.Y.2e;6.4q=E.3J[6.Y.3J||(E.3J.5q?"5q":"6B")](6.4i,n,0,1,6.Y.2e);6.2v=6.1O+((6.2D-6.1O)*6.4q);6.4r()}I Q}};E.2j.2F={2R:G(a){a.T.2R=a.2v},2B:G(a){a.T.2B=a.2v},1r:G(a){E.1x(a.T.R,"1r",a.2v)},6z:G(a){a.T.R[a.1e]=a.2v+a.2i}};E.1b.6m=G(){H c=0,3E=0,T=6[0],5t;9(T)8L(E.V){H b=E.17(T,"2X")=="4F",1D=T.12,23=T.23,2K=T.3H,4f=1N&&3x(4s)<8J;9(T.6V){5w=T.6V();1f(5w.1S+38.33(2K.2V.2R,2K.1G.2R),5w.3E+38.33(2K.2V.2B,2K.1G.2B));9(1h){H d=E("4o").17("8H");d=(d=="8G"||E.5g&&3x(4s)>=7)&&2||d;1f(-d,-d)}}J{1f(T.5l,T.5z);1W(23){1f(23.5l,23.5z);9(35&&/^t[d|h]$/i.14(1D.37)||!4f)d(23);9(4f&&!b&&E.17(23,"2X")=="4F")b=Q;23=23.23}1W(1D.37&&!/^1G|4o$/i.14(1D.37)){9(!/^8D|1I-9S.*$/i.14(E.17(1D,"19")))1f(-1D.2R,-1D.2B);9(35&&E.17(1D,"2U")!="3R")d(1D);1D=1D.12}9(4f&&b)1f(-2K.1G.5l,-2K.1G.5z)}5t={3E:3E,1S:c}}I 5t;G d(a){1f(E.17(a,"9T"),E.17(a,"8A"))}G 1f(l,t){c+=3x(l)||0;3E+=3x(t)||0}}})();',62,616,'||||||this|||if|||||||||||||||||||||||||||||||||function|var|return|else|length|for|data|each|type|false|true|style|null|elem|document|browser|undefined||options|||nodeName|parentNode||test|jQuery|apply|css|window|display|push|fn|constructor|url|prop|add|indexOf|msie|in|event|extend|complete|typeof|isFunction|className|replace|arguments|opacity|div|match|new|status|firstChild|attr|nodeType|hide|show|Array|success|parent|filter|trigger|body|height|table|script|tbody|cache|string|safari|start|hidden|value|merge|left|break|animate|dataType|while|map|find|global||get|id|offsetParent|select|toggle|selected|toUpperCase|remove|catch|try|cur|al|ready|duration|done|text|makeArray|unit|fx|swap|split|target||pushStack|toLowerCase|nextSibling|button|none|handle|guid|now|stack|tb|jsre|timeout|inArray|scrollTop|readyState|end|delete|step|one|name|nth|slice|doc|ret|preventDefault|width|call|events|checked|scrollLeft|exec|px|overflow|documentElement|grep|position|form|block|removeData|rl|timers|max|opera|mozilla|trim|tagName|Math|load|param|removeChild|disabled|insertBefore|async|encodeURIComponent|append|oldblock|val|childNodes|src|readyList|multiFilter|color|defaultView|stopPropagation|args|old|toString|is|last|first|eval|parseInt|self|domManip|prototype|getTime|curCSS|Date|top||ajax|ownerDocument|parseFloat|easing|has|queue|curAnim|custom|innerHTML|orig|currentStyle|visible|getElementById|isReady|error|static|bind|String|which|getComputedStyle|responseText|oWidth|oHeight|on|shift|json|child|RegExp|ol|lastModified|isXMLDoc|jsonp|jquery|previousSibling|dir|safari2|el|styleFloat|state|setInterval|radio|getElementsByTagName|tr|empty|html|getAttribute|pos|update|version|input|float|runtimeStyle|unshift|mouseover|getPropertyValue|GET|clearInterval|safariTimer|visibility|clean|__ie_init|absolute|handleHover|lastToggle|index|fromElement|relatedTarget|click|fix|evt|andSelf|removeEventListener|handler|cloneNode|addEventListener|triggered|nodeIndex|unique|Number|classFilter|prevObject|selectedIndex|after|submit|password|removeAttribute|file|expr|setTimeout|_|appendChild|ajaxSettings|client|active|win|sibling|deep|globalEval|boxModel|cssFloat|object|checkbox|parsererror|offsetLeft|wrapAll|dequeue|props|lastChild|swing|handleError|getResponseHeader|results|startTime|00|box|Modified|ifModified|offsetTop|evalScript|createElement|setRequestHeader|ctrlKey|callback|metaKey|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|serializeArray|init|notmodified|POST|loaded|appendTo|DOMContentLoaded|bindReady|mouseout|not|removeAttr|unbind|unload|Width|keyCode|charCode|onreadystatechange|clientX|pageX|srcElement|join|outerHTML|substr|zoom|parse|textarea|reset|image|odd|even|before|quickClass|quickID|prepend|quickChild|execScript|offset|scroll|processData|uuid|contents|continue|textContent|ajaxComplete|clone|setArray|webkit|nodeValue|fl|_default|100|linear|href|speed|eq|createTextNode|throw|replaceWith|splice|_toggle|xml|colgroup|304|200|alpha|Last|httpData|httpNotModified|httpSuccess|fieldset|beforeSend|getBoundingClientRect|XMLHttpRequest|ActiveXObject|col|br|abbr|pixelLeft|urlencoded|www|application|ajaxSetup|post|getJSON|getScript|elements|serialize|clientWidth|hasClass|scr|clientHeight|write|relative|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|right|dblclick|resize|focus|blur|frames|instanceof|hover|offsetWidth|triggerHandler|ipt|defer|offsetHeight|border|padding|clientY|pageY|Left|Right|toElement|Bottom|Top|cancelBubble|returnValue|detachEvent|attachEvent|substring|line|weight|animated|header|font|enabled|innerText|contains|only|size|gt|lt|uFFFF|u0128|417|inner|Height|toggleClass|removeClass|addClass|replaceAll|noConflict|insertAfter|prependTo|wrap|contentWindow|contentDocument|http|iframe|children|siblings|prevAll|nextAll|wrapInner|prev|Boolean|next|parents|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|compatible|borderTopWidth|ie|ra|inline|it|rv|medium|borderWidth|userAgent|522|navigator|with|concat|1px|10000|array|ig|PI|NaN|400|reverse|fast|600|slow|Function|Object|setAttribute|changed|be|can|property|fadeTo|fadeOut|getAttributeNode|fadeIn|slideToggle|method|slideUp|slideDown|action|cssText|stop|responseXML|option|content|300|th|protocol|td|location|send|cap|abort|colg|cos|tfoot|thead|With|leg|Requested|opt|GMT|1970|Jan|01|Thu|area|Since|hr|If|Type|Content|meta|specified|open|link|XMLHTTP|Microsoft|img|onload|row|borderLeftWidth|head|attributes'.split('|'),0,{})) \ No newline at end of file diff --git a/test/otherlibs/jquery/1.2.3/jquery.js b/test/otherlibs/jquery/1.2.3/jquery.js new file mode 100644 index 0000000..74cdfee --- /dev/null +++ b/test/otherlibs/jquery/1.2.3/jquery.js @@ -0,0 +1,11 @@ +/* + * jQuery 1.2.3 - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $ + * $Rev: 4663 $ + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(J(){7(1e.3N)L w=1e.3N;L E=1e.3N=J(a,b){K 1B E.2l.4T(a,b)};7(1e.$)L D=1e.$;1e.$=E;L u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;L G=/^.[^:#\\[\\.]*$/;E.1n=E.2l={4T:J(d,b){d=d||T;7(d.15){6[0]=d;6.M=1;K 6}N 7(1o d=="25"){L c=u.2O(d);7(c&&(c[1]||!b)){7(c[1])d=E.4a([c[1]],b);N{L a=T.5J(c[3]);7(a)7(a.2w!=c[3])K E().2s(d);N{6[0]=a;6.M=1;K 6}N d=[]}}N K 1B E(b).2s(d)}N 7(E.1q(d))K 1B E(T)[E.1n.21?"21":"3U"](d);K 6.6E(d.1k==1M&&d||(d.5h||d.M&&d!=1e&&!d.15&&d[0]!=10&&d[0].15)&&E.2I(d)||[d])},5h:"1.2.3",87:J(){K 6.M},M:0,22:J(a){K a==10?E.2I(6):6[a]},2F:J(b){L a=E(b);a.54=6;K a},6E:J(a){6.M=0;1M.2l.1g.1i(6,a);K 6},R:J(a,b){K E.R(6,a,b)},4X:J(b){L a=-1;6.R(J(i){7(6==b)a=i});K a},1J:J(c,a,b){L d=c;7(c.1k==4e)7(a==10)K 6.M&&E[b||"1J"](6[0],c)||10;N{d={};d[c]=a}K 6.R(J(i){Q(c 1p d)E.1J(b?6.W:6,c,E.1l(6,d[c],b,i,c))})},1j:J(b,a){7((b==\'27\'||b==\'1R\')&&2M(a)<0)a=10;K 6.1J(b,a,"2o")},1u:J(b){7(1o b!="3V"&&b!=V)K 6.4x().3t((6[0]&&6[0].2i||T).5r(b));L a="";E.R(b||6,J(){E.R(6.3p,J(){7(6.15!=8)a+=6.15!=1?6.6K:E.1n.1u([6])})});K a},5m:J(b){7(6[0])E(b,6[0].2i).5k().3o(6[0]).2c(J(){L a=6;2b(a.1C)a=a.1C;K a}).3t(6);K 6},8w:J(a){K 6.R(J(){E(6).6z().5m(a)})},8p:J(a){K 6.R(J(){E(6).5m(a)})},3t:J(){K 6.3O(18,P,S,J(a){7(6.15==1)6.38(a)})},6q:J(){K 6.3O(18,P,P,J(a){7(6.15==1)6.3o(a,6.1C)})},6o:J(){K 6.3O(18,S,S,J(a){6.1a.3o(a,6)})},5a:J(){K 6.3O(18,S,P,J(a){6.1a.3o(a,6.2B)})},3h:J(){K 6.54||E([])},2s:J(b){L c=E.2c(6,J(a){K E.2s(b,a)});K 6.2F(/[^+>] [^+>]/.17(b)||b.1f("..")>-1?E.57(c):c)},5k:J(e){L f=6.2c(J(){7(E.14.1d&&!E.3E(6)){L a=6.69(P),4Y=T.3s("1x");4Y.38(a);K E.4a([4Y.3d])[0]}N K 6.69(P)});L d=f.2s("*").4R().R(J(){7(6[F]!=10)6[F]=V});7(e===P)6.2s("*").4R().R(J(i){7(6.15==3)K;L c=E.O(6,"2R");Q(L a 1p c)Q(L b 1p c[a])E.16.1b(d[i],a,c[a][b],c[a][b].O)});K f},1E:J(b){K 6.2F(E.1q(b)&&E.3y(6,J(a,i){K b.1P(a,i)})||E.3e(b,6))},56:J(b){7(b.1k==4e)7(G.17(b))K 6.2F(E.3e(b,6,P));N b=E.3e(b,6);L a=b.M&&b[b.M-1]!==10&&!b.15;K 6.1E(J(){K a?E.33(6,b)<0:6!=b})},1b:J(a){K!a?6:6.2F(E.37(6.22(),a.1k==4e?E(a).22():a.M!=10&&(!a.12||E.12(a,"3u"))?a:[a]))},3H:J(a){K a?E.3e(a,6).M>0:S},7j:J(a){K 6.3H("."+a)},5O:J(b){7(b==10){7(6.M){L c=6[0];7(E.12(c,"2k")){L e=c.3T,5I=[],11=c.11,2X=c.U=="2k-2X";7(e<0)K V;Q(L i=2X?e:0,2f=2X?e+1:11.M;i<2f;i++){L d=11[i];7(d.2p){b=E.14.1d&&!d.9J.1A.9y?d.1u:d.1A;7(2X)K b;5I.1g(b)}}K 5I}N K(6[0].1A||"").1r(/\\r/g,"")}K 10}K 6.R(J(){7(6.15!=1)K;7(b.1k==1M&&/5u|5t/.17(6.U))6.3k=(E.33(6.1A,b)>=0||E.33(6.31,b)>=0);N 7(E.12(6,"2k")){L a=b.1k==1M?b:[b];E("98",6).R(J(){6.2p=(E.33(6.1A,a)>=0||E.33(6.1u,a)>=0)});7(!a.M)6.3T=-1}N 6.1A=b})},3q:J(a){K a==10?(6.M?6[0].3d:V):6.4x().3t(a)},6S:J(a){K 6.5a(a).1V()},6Z:J(i){K 6.2K(i,i+1)},2K:J(){K 6.2F(1M.2l.2K.1i(6,18))},2c:J(b){K 6.2F(E.2c(6,J(a,i){K b.1P(a,i,a)}))},4R:J(){K 6.1b(6.54)},O:J(d,b){L a=d.23(".");a[1]=a[1]?"."+a[1]:"";7(b==V){L c=6.5n("8P"+a[1]+"!",[a[0]]);7(c==10&&6.M)c=E.O(6[0],d);K c==V&&a[1]?6.O(a[0]):c}N K 6.1N("8K"+a[1]+"!",[a[0],b]).R(J(){E.O(6,d,b)})},35:J(a){K 6.R(J(){E.35(6,a)})},3O:J(g,f,h,d){L e=6.M>1,3n;K 6.R(J(){7(!3n){3n=E.4a(g,6.2i);7(h)3n.8D()}L b=6;7(f&&E.12(6,"1O")&&E.12(3n[0],"4v"))b=6.3S("1U")[0]||6.38(6.2i.3s("1U"));L c=E([]);E.R(3n,J(){L a=e?E(6).5k(P)[0]:6;7(E.12(a,"1m")){c=c.1b(a)}N{7(a.15==1)c=c.1b(E("1m",a).1V());d.1P(b,a)}});c.R(6A)})}};E.2l.4T.2l=E.2l;J 6A(i,a){7(a.3Q)E.3P({1c:a.3Q,3l:S,1H:"1m"});N E.5g(a.1u||a.6x||a.3d||"");7(a.1a)a.1a.34(a)}E.1s=E.1n.1s=J(){L b=18[0]||{},i=1,M=18.M,5c=S,11;7(b.1k==8d){5c=b;b=18[1]||{};i=2}7(1o b!="3V"&&1o b!="J")b={};7(M==1){b=6;i=0}Q(;i-1}},68:J(b,c,a){L e={};Q(L d 1p c){e[d]=b.W[d];b.W[d]=c[d]}a.1P(b);Q(L d 1p c)b.W[d]=e[d]},1j:J(d,e,c){7(e=="27"||e=="1R"){L b,46={43:"4W",4U:"1Z",19:"3D"},3c=e=="27"?["7O","7M"]:["7J","7I"];J 5E(){b=e=="27"?d.7H:d.7F;L a=0,2N=0;E.R(3c,J(){a+=2M(E.2o(d,"7E"+6,P))||0;2N+=2M(E.2o(d,"2N"+6+"5X",P))||0});b-=24.7C(a+2N)}7(E(d).3H(":4d"))5E();N E.68(d,46,5E);K 24.2f(0,b)}K E.2o(d,e,c)},2o:J(e,k,j){L d;J 3x(b){7(!E.14.2d)K S;L a=T.4c.4K(b,V);K!a||a.4M("3x")==""}7(k=="1w"&&E.14.1d){d=E.1J(e.W,"1w");K d==""?"1":d}7(E.14.2z&&k=="19"){L c=e.W.50;e.W.50="0 7r 7o";e.W.50=c}7(k.1D(/4g/i))k=y;7(!j&&e.W&&e.W[k])d=e.W[k];N 7(T.4c&&T.4c.4K){7(k.1D(/4g/i))k="4g";k=k.1r(/([A-Z])/g,"-$1").2h();L h=T.4c.4K(e,V);7(h&&!3x(e))d=h.4M(k);N{L f=[],2C=[];Q(L a=e;a&&3x(a);a=a.1a)2C.4J(a);Q(L i=0;i<2C.M;i++)7(3x(2C[i])){f[i]=2C[i].W.19;2C[i].W.19="3D"}d=k=="19"&&f[2C.M-1]!=V?"2H":(h&&h.4M(k))||"";Q(L i=0;i]*?)\\/>/g,J(b,a,c){K c.1D(/^(aa|a6|7e|a5|4D|7a|a0|3m|9W|9U|9S)$/i)?b:a+">"});L f=E.3g(d).2h(),1x=h.3s("1x");L e=!f.1f("<9P")&&[1,"<2k 74=\'74\'>",""]||!f.1f("<9M")&&[1,"<73>",""]||f.1D(/^<(9G|1U|9E|9B|9x)/)&&[1,"<1O>",""]||!f.1f("<4v")&&[2,"<1O><1U>",""]||(!f.1f("<9w")||!f.1f("<9v"))&&[3,"<1O><1U><4v>",""]||!f.1f("<7e")&&[2,"<1O><1U><6V>",""]||E.14.1d&&[1,"1x<1x>",""]||[0,"",""];1x.3d=e[1]+d+e[2];2b(e[0]--)1x=1x.5o;7(E.14.1d){L g=!f.1f("<1O")&&f.1f("<1U")<0?1x.1C&&1x.1C.3p:e[1]=="<1O>"&&f.1f("<1U")<0?1x.3p:[];Q(L j=g.M-1;j>=0;--j)7(E.12(g[j],"1U")&&!g[j].3p.M)g[j].1a.34(g[j]);7(/^\\s/.17(d))1x.3o(h.5r(d.1D(/^\\s*/)[0]),1x.1C)}d=E.2I(1x.3p)}7(d.M===0&&(!E.12(d,"3u")&&!E.12(d,"2k")))K;7(d[0]==10||E.12(d,"3u")||d.11)k.1g(d);N k=E.37(k,d)});K k},1J:J(d,e,c){7(!d||d.15==3||d.15==8)K 10;L f=E.3E(d)?{}:E.46;7(e=="2p"&&E.14.2d)d.1a.3T;7(f[e]){7(c!=10)d[f[e]]=c;K d[f[e]]}N 7(E.14.1d&&e=="W")K E.1J(d.W,"9u",c);N 7(c==10&&E.14.1d&&E.12(d,"3u")&&(e=="9r"||e=="9o"))K d.9m(e).6K;N 7(d.28){7(c!=10){7(e=="U"&&E.12(d,"4D")&&d.1a)6Q"U 9i 9h\'t 9g 9e";d.9b(e,""+c)}7(E.14.1d&&/6O|3Q/.17(e)&&!E.3E(d))K d.4z(e,2);K d.4z(e)}N{7(e=="1w"&&E.14.1d){7(c!=10){d.6k=1;d.1E=(d.1E||"").1r(/6M\\([^)]*\\)/,"")+(2M(c).3X()=="96"?"":"6M(1w="+c*6L+")")}K d.1E&&d.1E.1f("1w=")>=0?(2M(d.1E.1D(/1w=([^)]*)/)[1])/6L).3X():""}e=e.1r(/-([a-z])/95,J(a,b){K b.2E()});7(c!=10)d[e]=c;K d[e]}},3g:J(a){K(a||"").1r(/^\\s+|\\s+$/g,"")},2I:J(b){L a=[];7(1o b!="93")Q(L i=0,M=b.M;i*",6).1V();2b(6.1C)6.34(6.1C)}},J(a,b){E.1n[a]=J(){K 6.R(b,18)}});E.R(["8f","5X"],J(i,c){L b=c.2h();E.1n[b]=J(a){K 6[0]==1e?E.14.2z&&T.1h["5e"+c]||E.14.2d&&1e["8e"+c]||T.6F=="79"&&T.1F["5e"+c]||T.1h["5e"+c]:6[0]==T?24.2f(24.2f(T.1h["5d"+c],T.1F["5d"+c]),24.2f(T.1h["5L"+c],T.1F["5L"+c])):a==10?(6.M?E.1j(6[0],b):V):6.1j(b,a.1k==4e?a:a+"2S")}});L C=E.14.2d&&4s(E.14.5K)<8c?"(?:[\\\\w*4r-]|\\\\\\\\.)":"(?:[\\\\w\\8b-\\8a*4r-]|\\\\\\\\.)",6v=1B 4q("^>\\\\s*("+C+"+)"),6u=1B 4q("^("+C+"+)(#)("+C+"+)"),6s=1B 4q("^([#.]?)("+C+"*)");E.1s({6r:{"":J(a,i,m){K m[2]=="*"||E.12(a,m[2])},"#":J(a,i,m){K a.4z("2w")==m[2]},":":{89:J(a,i,m){K im[3]-0},2Z:J(a,i,m){K m[3]-0==i},6Z:J(a,i,m){K m[3]-0==i},3j:J(a,i){K i==0},3J:J(a,i,m,r){K i==r.M-1},6n:J(a,i){K i%2==0},6l:J(a,i){K i%2},"3j-4p":J(a){K a.1a.3S("*")[0]==a},"3J-4p":J(a){K E.2Z(a.1a.5o,1,"4t")==a},"83-4p":J(a){K!E.2Z(a.1a.5o,2,"4t")},6B:J(a){K a.1C},4x:J(a){K!a.1C},82:J(a,i,m){K(a.6x||a.81||E(a).1u()||"").1f(m[3])>=0},4d:J(a){K"1Z"!=a.U&&E.1j(a,"19")!="2H"&&E.1j(a,"4U")!="1Z"},1Z:J(a){K"1Z"==a.U||E.1j(a,"19")=="2H"||E.1j(a,"4U")=="1Z"},80:J(a){K!a.2Y},2Y:J(a){K a.2Y},3k:J(a){K a.3k},2p:J(a){K a.2p||E.1J(a,"2p")},1u:J(a){K"1u"==a.U},5u:J(a){K"5u"==a.U},5t:J(a){K"5t"==a.U},59:J(a){K"59"==a.U},3I:J(a){K"3I"==a.U},58:J(a){K"58"==a.U},6j:J(a){K"6j"==a.U},6i:J(a){K"6i"==a.U},2G:J(a){K"2G"==a.U||E.12(a,"2G")},4D:J(a){K/4D|2k|6h|2G/i.17(a.12)},3Y:J(a,i,m){K E.2s(m[3],a).M},7X:J(a){K/h\\d/i.17(a.12)},7W:J(a){K E.3y(E.3G,J(b){K a==b.Y}).M}}},6g:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1B 4q("^([:.#]*)("+C+"+)")],3e:J(a,c,b){L d,2m=[];2b(a&&a!=d){d=a;L f=E.1E(a,c,b);a=f.t.1r(/^\\s*,\\s*/,"");2m=b?c=f.r:E.37(2m,f.r)}K 2m},2s:J(t,p){7(1o t!="25")K[t];7(p&&p.15!=1&&p.15!=9)K[];p=p||T;L d=[p],2r=[],3J,12;2b(t&&3J!=t){L r=[];3J=t;t=E.3g(t);L o=S;L g=6v;L m=g.2O(t);7(m){12=m[1].2E();Q(L i=0;d[i];i++)Q(L c=d[i].1C;c;c=c.2B)7(c.15==1&&(12=="*"||c.12.2E()==12))r.1g(c);d=r;t=t.1r(g,"");7(t.1f(" ")==0)6w;o=P}N{g=/^([>+~])\\s*(\\w*)/i;7((m=g.2O(t))!=V){r=[];L l={};12=m[2].2E();m=m[1];Q(L j=0,3f=d.M;j<3f;j++){L n=m=="~"||m=="+"?d[j].2B:d[j].1C;Q(;n;n=n.2B)7(n.15==1){L h=E.O(n);7(m=="~"&&l[h])1Q;7(!12||n.12.2E()==12){7(m=="~")l[h]=P;r.1g(n)}7(m=="+")1Q}}d=r;t=E.3g(t.1r(g,""));o=P}}7(t&&!o){7(!t.1f(",")){7(p==d[0])d.4l();2r=E.37(2r,d);r=d=[p];t=" "+t.6e(1,t.M)}N{L k=6u;L m=k.2O(t);7(m){m=[0,m[2],m[3],m[1]]}N{k=6s;m=k.2O(t)}m[2]=m[2].1r(/\\\\/g,"");L f=d[d.M-1];7(m[1]=="#"&&f&&f.5J&&!E.3E(f)){L q=f.5J(m[2]);7((E.14.1d||E.14.2z)&&q&&1o q.2w=="25"&&q.2w!=m[2])q=E(\'[@2w="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.12(q,m[3]))?[q]:[]}N{Q(L i=0;d[i];i++){L a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&d[i].12.2h()=="3V")a="3m";r=E.37(r,d[i].3S(a))}7(m[1]==".")r=E.55(r,m[2]);7(m[1]=="#"){L e=[];Q(L i=0;r[i];i++)7(r[i].4z("2w")==m[2]){e=[r[i]];1Q}r=e}d=r}t=t.1r(k,"")}}7(t){L b=E.1E(t,r);d=r=b.r;t=E.3g(b.t)}}7(t)d=[];7(d&&p==d[0])d.4l();2r=E.37(2r,d);K 2r},55:J(r,m,a){m=" "+m+" ";L c=[];Q(L i=0;r[i];i++){L b=(" "+r[i].1t+" ").1f(m)>=0;7(!a&&b||a&&!b)c.1g(r[i])}K c},1E:J(t,r,h){L d;2b(t&&t!=d){d=t;L p=E.6g,m;Q(L i=0;p[i];i++){m=p[i].2O(t);7(m){t=t.7V(m[0].M);m[2]=m[2].1r(/\\\\/g,"");1Q}}7(!m)1Q;7(m[1]==":"&&m[2]=="56")r=G.17(m[3])?E.1E(m[3],r,P).r:E(r).56(m[3]);N 7(m[1]==".")r=E.55(r,m[2],h);N 7(m[1]=="["){L g=[],U=m[3];Q(L i=0,3f=r.M;i<3f;i++){L a=r[i],z=a[E.46[m[2]]||m[2]];7(z==V||/6O|3Q|2p/.17(m[2]))z=E.1J(a,m[2])||\'\';7((U==""&&!!z||U=="="&&z==m[5]||U=="!="&&z!=m[5]||U=="^="&&z&&!z.1f(m[5])||U=="$="&&z.6e(z.M-m[5].M)==m[5]||(U=="*="||U=="~=")&&z.1f(m[5])>=0)^h)g.1g(a)}r=g}N 7(m[1]==":"&&m[2]=="2Z-4p"){L e={},g=[],17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2O(m[3]=="6n"&&"2n"||m[3]=="6l"&&"2n+1"||!/\\D/.17(m[3])&&"7U+"+m[3]||m[3]),3j=(17[1]+(17[2]||1))-0,d=17[3]-0;Q(L i=0,3f=r.M;i<3f;i++){L j=r[i],1a=j.1a,2w=E.O(1a);7(!e[2w]){L c=1;Q(L n=1a.1C;n;n=n.2B)7(n.15==1)n.4k=c++;e[2w]=P}L b=S;7(3j==0){7(j.4k==d)b=P}N 7((j.4k-d)%3j==0&&(j.4k-d)/3j>=0)b=P;7(b^h)g.1g(j)}r=g}N{L f=E.6r[m[1]];7(1o f=="3V")f=f[m[2]];7(1o f=="25")f=6c("S||J(a,i){K "+f+";}");r=E.3y(r,J(a,i){K f(a,i,m,r)},h)}}K{r:r,t:t}},4u:J(b,c){L d=[];L a=b[c];2b(a&&a!=T){7(a.15==1)d.1g(a);a=a[c]}K d},2Z:J(a,e,c,b){e=e||1;L d=0;Q(;a;a=a[c])7(a.15==1&&++d==e)1Q;K a},5i:J(n,a){L r=[];Q(;n;n=n.2B){7(n.15==1&&(!a||n!=a))r.1g(n)}K r}});E.16={1b:J(f,i,g,e){7(f.15==3||f.15==8)K;7(E.14.1d&&f.53!=10)f=1e;7(!g.2D)g.2D=6.2D++;7(e!=10){L h=g;g=J(){K h.1i(6,18)};g.O=e;g.2D=h.2D}L j=E.O(f,"2R")||E.O(f,"2R",{}),1v=E.O(f,"1v")||E.O(f,"1v",J(){L a;7(1o E=="10"||E.16.5f)K a;a=E.16.1v.1i(18.3R.Y,18);K a});1v.Y=f;E.R(i.23(/\\s+/),J(c,b){L a=b.23(".");b=a[0];g.U=a[1];L d=j[b];7(!d){d=j[b]={};7(!E.16.2y[b]||E.16.2y[b].4j.1P(f)===S){7(f.3F)f.3F(b,1v,S);N 7(f.6b)f.6b("4i"+b,1v)}}d[g.2D]=g;E.16.2a[b]=P});f=V},2D:1,2a:{},1V:J(e,h,f){7(e.15==3||e.15==8)K;L i=E.O(e,"2R"),29,4X;7(i){7(h==10||(1o h=="25"&&h.7T(0)=="."))Q(L g 1p i)6.1V(e,g+(h||""));N{7(h.U){f=h.2q;h=h.U}E.R(h.23(/\\s+/),J(b,a){L c=a.23(".");a=c[0];7(i[a]){7(f)2V i[a][f.2D];N Q(f 1p i[a])7(!c[1]||i[a][f].U==c[1])2V i[a][f];Q(29 1p i[a])1Q;7(!29){7(!E.16.2y[a]||E.16.2y[a].4h.1P(e)===S){7(e.67)e.67(a,E.O(e,"1v"),S);N 7(e.66)e.66("4i"+a,E.O(e,"1v"))}29=V;2V i[a]}}})}Q(29 1p i)1Q;7(!29){L d=E.O(e,"1v");7(d)d.Y=V;E.35(e,"2R");E.35(e,"1v")}}},1N:J(g,c,d,f,h){c=E.2I(c||[]);7(g.1f("!")>=0){g=g.2K(0,-1);L a=P}7(!d){7(6.2a[g])E("*").1b([1e,T]).1N(g,c)}N{7(d.15==3||d.15==8)K 10;L b,29,1n=E.1q(d[g]||V),16=!c[0]||!c[0].36;7(16)c.4J(6.4Z({U:g,2L:d}));c[0].U=g;7(a)c[0].65=P;7(E.1q(E.O(d,"1v")))b=E.O(d,"1v").1i(d,c);7(!1n&&d["4i"+g]&&d["4i"+g].1i(d,c)===S)b=S;7(16)c.4l();7(h&&E.1q(h)){29=h.1i(d,b==V?c:c.71(b));7(29!==10)b=29}7(1n&&f!==S&&b!==S&&!(E.12(d,\'a\')&&g=="4V")){6.5f=P;1S{d[g]()}1X(e){}}6.5f=S}K b},1v:J(c){L a;c=E.16.4Z(c||1e.16||{});L b=c.U.23(".");c.U=b[0];L f=E.O(6,"2R")&&E.O(6,"2R")[c.U],42=1M.2l.2K.1P(18,1);42.4J(c);Q(L j 1p f){L d=f[j];42[0].2q=d;42[0].O=d.O;7(!b[1]&&!c.65||d.U==b[1]){L e=d.1i(6,42);7(a!==S)a=e;7(e===S){c.36();c.44()}}}7(E.14.1d)c.2L=c.36=c.44=c.2q=c.O=V;K a},4Z:J(c){L a=c;c=E.1s({},a);c.36=J(){7(a.36)a.36();a.7S=S};c.44=J(){7(a.44)a.44();a.7R=P};7(!c.2L)c.2L=c.7Q||T;7(c.2L.15==3)c.2L=a.2L.1a;7(!c.4S&&c.5w)c.4S=c.5w==c.2L?c.7P:c.5w;7(c.64==V&&c.63!=V){L b=T.1F,1h=T.1h;c.64=c.63+(b&&b.2v||1h&&1h.2v||0)-(b.62||0);c.7N=c.7L+(b&&b.2x||1h&&1h.2x||0)-(b.60||0)}7(!c.3c&&((c.4f||c.4f===0)?c.4f:c.5Z))c.3c=c.4f||c.5Z;7(!c.7b&&c.5Y)c.7b=c.5Y;7(!c.3c&&c.2G)c.3c=(c.2G&1?1:(c.2G&2?3:(c.2G&4?2:0)));K c},2y:{21:{4j:J(){5M();K},4h:J(){K}},3C:{4j:J(){7(E.14.1d)K S;E(6).2j("4P",E.16.2y.3C.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4P",E.16.2y.3C.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3C";K E.16.1v.1i(6,18)}},3B:{4j:J(){7(E.14.1d)K S;E(6).2j("4O",E.16.2y.3B.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4O",E.16.2y.3B.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3B";K E.16.1v.1i(6,18)}}}};E.1n.1s({2j:J(c,a,b){K c=="4H"?6.2X(c,a,b):6.R(J(){E.16.1b(6,c,b||a,b&&a)})},2X:J(d,b,c){K 6.R(J(){E.16.1b(6,d,J(a){E(6).3w(a);K(c||b).1i(6,18)},c&&b)})},3w:J(a,b){K 6.R(J(){E.16.1V(6,a,b)})},1N:J(c,a,b){K 6.R(J(){E.16.1N(c,a,6,P,b)})},5n:J(c,a,b){7(6[0])K E.16.1N(c,a,6[0],S,b);K 10},2g:J(){L b=18;K 6.4V(J(a){6.4N=0==6.4N?1:0;a.36();K b[6.4N].1i(6,18)||S})},7D:J(a,b){K 6.2j(\'3C\',a).2j(\'3B\',b)},21:J(a){5M();7(E.2Q)a.1P(T,E);N E.3A.1g(J(){K a.1P(6,E)});K 6}});E.1s({2Q:S,3A:[],21:J(){7(!E.2Q){E.2Q=P;7(E.3A){E.R(E.3A,J(){6.1i(T)});E.3A=V}E(T).5n("21")}}});L x=S;J 5M(){7(x)K;x=P;7(T.3F&&!E.14.2z)T.3F("5W",E.21,S);7(E.14.1d&&1e==3b)(J(){7(E.2Q)K;1S{T.1F.7B("26")}1X(3a){3z(18.3R,0);K}E.21()})();7(E.14.2z)T.3F("5W",J(){7(E.2Q)K;Q(L i=0;i=0){L i=g.2K(e,g.M);g=g.2K(0,e)}c=c||J(){};L f="4Q";7(d)7(E.1q(d)){c=d;d=V}N{d=E.3m(d);f="61"}L h=6;E.3P({1c:g,U:f,1H:"3q",O:d,1y:J(a,b){7(b=="1W"||b=="5U")h.3q(i?E("<1x/>").3t(a.4b.1r(/<1m(.|\\s)*?\\/1m>/g,"")).2s(i):a.4b);h.R(c,[a.4b,b,a])}});K 6},7n:J(){K E.3m(6.5T())},5T:J(){K 6.2c(J(){K E.12(6,"3u")?E.2I(6.7m):6}).1E(J(){K 6.31&&!6.2Y&&(6.3k||/2k|6h/i.17(6.12)||/1u|1Z|3I/i.17(6.U))}).2c(J(i,c){L b=E(6).5O();K b==V?V:b.1k==1M?E.2c(b,J(a,i){K{31:c.31,1A:a}}):{31:c.31,1A:b}}).22()}});E.R("5S,6d,5R,6D,5Q,6m".23(","),J(i,o){E.1n[o]=J(f){K 6.2j(o,f)}});L B=(1B 3v).3L();E.1s({22:J(d,b,a,c){7(E.1q(b)){a=b;b=V}K E.3P({U:"4Q",1c:d,O:b,1W:a,1H:c})},7l:J(b,a){K E.22(b,V,a,"1m")},7k:J(c,b,a){K E.22(c,b,a,"3i")},7i:J(d,b,a,c){7(E.1q(b)){a=b;b={}}K E.3P({U:"61",1c:d,O:b,1W:a,1H:c})},85:J(a){E.1s(E.4I,a)},4I:{2a:P,U:"4Q",2U:0,5P:"4o/x-7h-3u-7g",5N:P,3l:P,O:V,6p:V,3I:V,49:{3M:"4o/3M, 1u/3M",3q:"1u/3q",1m:"1u/4m, 4o/4m",3i:"4o/3i, 1u/4m",1u:"1u/a7",4G:"*/*"}},4F:{},3P:J(s){L f,2W=/=\\?(&|$)/g,1z,O;s=E.1s(P,s,E.1s(P,{},E.4I,s));7(s.O&&s.5N&&1o s.O!="25")s.O=E.3m(s.O);7(s.1H=="4E"){7(s.U.2h()=="22"){7(!s.1c.1D(2W))s.1c+=(s.1c.1D(/\\?/)?"&":"?")+(s.4E||"7d")+"=?"}N 7(!s.O||!s.O.1D(2W))s.O=(s.O?s.O+"&":"")+(s.4E||"7d")+"=?";s.1H="3i"}7(s.1H=="3i"&&(s.O&&s.O.1D(2W)||s.1c.1D(2W))){f="4E"+B++;7(s.O)s.O=(s.O+"").1r(2W,"="+f+"$1");s.1c=s.1c.1r(2W,"="+f+"$1");s.1H="1m";1e[f]=J(a){O=a;1W();1y();1e[f]=10;1S{2V 1e[f]}1X(e){}7(h)h.34(g)}}7(s.1H=="1m"&&s.1T==V)s.1T=S;7(s.1T===S&&s.U.2h()=="22"){L i=(1B 3v()).3L();L j=s.1c.1r(/(\\?|&)4r=.*?(&|$)/,"$a4="+i+"$2");s.1c=j+((j==s.1c)?(s.1c.1D(/\\?/)?"&":"?")+"4r="+i:"")}7(s.O&&s.U.2h()=="22"){s.1c+=(s.1c.1D(/\\?/)?"&":"?")+s.O;s.O=V}7(s.2a&&!E.5H++)E.16.1N("5S");7((!s.1c.1f("a3")||!s.1c.1f("//"))&&s.1H=="1m"&&s.U.2h()=="22"){L h=T.3S("6f")[0];L g=T.3s("1m");g.3Q=s.1c;7(s.7c)g.a2=s.7c;7(!f){L l=S;g.9Z=g.9Y=J(){7(!l&&(!6.39||6.39=="5V"||6.39=="1y")){l=P;1W();1y();h.34(g)}}}h.38(g);K 10}L m=S;L k=1e.78?1B 78("9X.9V"):1B 76();k.9T(s.U,s.1c,s.3l,s.6p,s.3I);1S{7(s.O)k.4C("9R-9Q",s.5P);7(s.5C)k.4C("9O-5A-9N",E.4F[s.1c]||"9L, 9K 9I 9H 5z:5z:5z 9F");k.4C("X-9C-9A","76");k.4C("9z",s.1H&&s.49[s.1H]?s.49[s.1H]+", */*":s.49.4G)}1X(e){}7(s.6Y)s.6Y(k);7(s.2a)E.16.1N("6m",[k,s]);L c=J(a){7(!m&&k&&(k.39==4||a=="2U")){m=P;7(d){6I(d);d=V}1z=a=="2U"&&"2U"||!E.6X(k)&&"3a"||s.5C&&E.6J(k,s.1c)&&"5U"||"1W";7(1z=="1W"){1S{O=E.6W(k,s.1H)}1X(e){1z="5x"}}7(1z=="1W"){L b;1S{b=k.5q("6U-5A")}1X(e){}7(s.5C&&b)E.4F[s.1c]=b;7(!f)1W()}N E.5v(s,k,1z);1y();7(s.3l)k=V}};7(s.3l){L d=53(c,13);7(s.2U>0)3z(J(){7(k){k.9t();7(!m)c("2U")}},s.2U)}1S{k.9s(s.O)}1X(e){E.5v(s,k,V,e)}7(!s.3l)c();J 1W(){7(s.1W)s.1W(O,1z);7(s.2a)E.16.1N("5Q",[k,s])}J 1y(){7(s.1y)s.1y(k,1z);7(s.2a)E.16.1N("5R",[k,s]);7(s.2a&&!--E.5H)E.16.1N("6d")}K k},5v:J(s,a,b,e){7(s.3a)s.3a(a,b,e);7(s.2a)E.16.1N("6D",[a,s,e])},5H:0,6X:J(r){1S{K!r.1z&&9q.9p=="59:"||(r.1z>=6T&&r.1z<9n)||r.1z==6R||r.1z==9l||E.14.2d&&r.1z==10}1X(e){}K S},6J:J(a,c){1S{L b=a.5q("6U-5A");K a.1z==6R||b==E.4F[c]||E.14.2d&&a.1z==10}1X(e){}K S},6W:J(r,b){L c=r.5q("9k-U");L d=b=="3M"||!b&&c&&c.1f("3M")>=0;L a=d?r.9j:r.4b;7(d&&a.1F.28=="5x")6Q"5x";7(b=="1m")E.5g(a);7(b=="3i")a=6c("("+a+")");K a},3m:J(a){L s=[];7(a.1k==1M||a.5h)E.R(a,J(){s.1g(3r(6.31)+"="+3r(6.1A))});N Q(L j 1p a)7(a[j]&&a[j].1k==1M)E.R(a[j],J(){s.1g(3r(j)+"="+3r(6))});N s.1g(3r(j)+"="+3r(a[j]));K s.6a("&").1r(/%20/g,"+")}});E.1n.1s({1G:J(c,b){K c?6.2e({1R:"1G",27:"1G",1w:"1G"},c,b):6.1E(":1Z").R(J(){6.W.19=6.5s||"";7(E.1j(6,"19")=="2H"){L a=E("<"+6.28+" />").6y("1h");6.W.19=a.1j("19");7(6.W.19=="2H")6.W.19="3D";a.1V()}}).3h()},1I:J(b,a){K b?6.2e({1R:"1I",27:"1I",1w:"1I"},b,a):6.1E(":4d").R(J(){6.5s=6.5s||E.1j(6,"19");6.W.19="2H"}).3h()},6N:E.1n.2g,2g:J(a,b){K E.1q(a)&&E.1q(b)?6.6N(a,b):a?6.2e({1R:"2g",27:"2g",1w:"2g"},a,b):6.R(J(){E(6)[E(6).3H(":1Z")?"1G":"1I"]()})},9f:J(b,a){K 6.2e({1R:"1G"},b,a)},9d:J(b,a){K 6.2e({1R:"1I"},b,a)},9c:J(b,a){K 6.2e({1R:"2g"},b,a)},9a:J(b,a){K 6.2e({1w:"1G"},b,a)},99:J(b,a){K 6.2e({1w:"1I"},b,a)},97:J(c,a,b){K 6.2e({1w:a},c,b)},2e:J(l,k,j,h){L i=E.6P(k,j,h);K 6[i.2P===S?"R":"2P"](J(){7(6.15!=1)K S;L g=E.1s({},i);L f=E(6).3H(":1Z"),4A=6;Q(L p 1p l){7(l[p]=="1I"&&f||l[p]=="1G"&&!f)K E.1q(g.1y)&&g.1y.1i(6);7(p=="1R"||p=="27"){g.19=E.1j(6,"19");g.32=6.W.32}}7(g.32!=V)6.W.32="1Z";g.40=E.1s({},l);E.R(l,J(c,a){L e=1B E.2t(4A,g,c);7(/2g|1G|1I/.17(a))e[a=="2g"?f?"1G":"1I":a](l);N{L b=a.3X().1D(/^([+-]=)?([\\d+-.]+)(.*)$/),1Y=e.2m(P)||0;7(b){L d=2M(b[2]),2A=b[3]||"2S";7(2A!="2S"){4A.W[c]=(d||1)+2A;1Y=((d||1)/e.2m(P))*1Y;4A.W[c]=1Y+2A}7(b[1])d=((b[1]=="-="?-1:1)*d)+1Y;e.45(1Y,d,2A)}N e.45(1Y,a,"")}});K P})},2P:J(a,b){7(E.1q(a)||(a&&a.1k==1M)){b=a;a="2t"}7(!a||(1o a=="25"&&!b))K A(6[0],a);K 6.R(J(){7(b.1k==1M)A(6,a,b);N{A(6,a).1g(b);7(A(6,a).M==1)b.1i(6)}})},94:J(b,c){L a=E.3G;7(b)6.2P([]);6.R(J(){Q(L i=a.M-1;i>=0;i--)7(a[i].Y==6){7(c)a[i](P);a.72(i,1)}});7(!c)6.5p();K 6}});L A=J(b,c,a){7(!b)K 10;c=c||"2t";L q=E.O(b,c+"2P");7(!q||a)q=E.O(b,c+"2P",a?E.2I(a):[]);K q};E.1n.5p=J(a){a=a||"2t";K 6.R(J(){L q=A(6,a);q.4l();7(q.M)q[0].1i(6)})};E.1s({6P:J(b,a,c){L d=b&&b.1k==92?b:{1y:c||!c&&a||E.1q(b)&&b,2u:b,3Z:c&&a||a&&a.1k!=91&&a};d.2u=(d.2u&&d.2u.1k==51?d.2u:{90:8Z,9D:6T}[d.2u])||8X;d.5y=d.1y;d.1y=J(){7(d.2P!==S)E(6).5p();7(E.1q(d.5y))d.5y.1i(6)};K d},3Z:{70:J(p,n,b,a){K b+a*p},5j:J(p,n,b,a){K((-24.8V(p*24.8U)/2)+0.5)*a+b}},3G:[],3W:V,2t:J(b,c,a){6.11=c;6.Y=b;6.1l=a;7(!c.47)c.47={}}});E.2t.2l={4y:J(){7(6.11.30)6.11.30.1i(6.Y,[6.2J,6]);(E.2t.30[6.1l]||E.2t.30.4G)(6);7(6.1l=="1R"||6.1l=="27")6.Y.W.19="3D"},2m:J(a){7(6.Y[6.1l]!=V&&6.Y.W[6.1l]==V)K 6.Y[6.1l];L r=2M(E.1j(6.Y,6.1l,a));K r&&r>-8Q?r:2M(E.2o(6.Y,6.1l))||0},45:J(c,b,d){6.5B=(1B 3v()).3L();6.1Y=c;6.3h=b;6.2A=d||6.2A||"2S";6.2J=6.1Y;6.4B=6.4w=0;6.4y();L e=6;J t(a){K e.30(a)}t.Y=6.Y;E.3G.1g(t);7(E.3W==V){E.3W=53(J(){L a=E.3G;Q(L i=0;i6.11.2u+6.5B){6.2J=6.3h;6.4B=6.4w=1;6.4y();6.11.40[6.1l]=P;L b=P;Q(L i 1p 6.11.40)7(6.11.40[i]!==P)b=S;7(b){7(6.11.19!=V){6.Y.W.32=6.11.32;6.Y.W.19=6.11.19;7(E.1j(6.Y,"19")=="2H")6.Y.W.19="3D"}7(6.11.1I)6.Y.W.19="2H";7(6.11.1I||6.11.1G)Q(L p 1p 6.11.40)E.1J(6.Y.W,p,6.11.47[p])}7(b&&E.1q(6.11.1y))6.11.1y.1i(6.Y);K S}N{L n=t-6.5B;6.4w=n/6.11.2u;6.4B=E.3Z[6.11.3Z||(E.3Z.5j?"5j":"70")](6.4w,n,0,1,6.11.2u);6.2J=6.1Y+((6.3h-6.1Y)*6.4B);6.4y()}K P}};E.2t.30={2v:J(a){a.Y.2v=a.2J},2x:J(a){a.Y.2x=a.2J},1w:J(a){E.1J(a.Y.W,"1w",a.2J)},4G:J(a){a.Y.W[a.1l]=a.2J+a.2A}};E.1n.5L=J(){L b=0,3b=0,Y=6[0],5l;7(Y)8M(E.14){L d=Y.1a,41=Y,1K=Y.1K,1L=Y.2i,5D=2d&&4s(5K)<8J&&!/a1/i.17(v),2T=E.1j(Y,"43")=="2T";7(Y.6G){L c=Y.6G();1b(c.26+24.2f(1L.1F.2v,1L.1h.2v),c.3b+24.2f(1L.1F.2x,1L.1h.2x));1b(-1L.1F.62,-1L.1F.60)}N{1b(Y.5G,Y.5F);2b(1K){1b(1K.5G,1K.5F);7(48&&!/^t(8H|d|h)$/i.17(1K.28)||2d&&!5D)2N(1K);7(!2T&&E.1j(1K,"43")=="2T")2T=P;41=/^1h$/i.17(1K.28)?41:1K;1K=1K.1K}2b(d&&d.28&&!/^1h|3q$/i.17(d.28)){7(!/^8G|1O.*$/i.17(E.1j(d,"19")))1b(-d.2v,-d.2x);7(48&&E.1j(d,"32")!="4d")2N(d);d=d.1a}7((5D&&(2T||E.1j(41,"43")=="4W"))||(48&&E.1j(41,"43")!="4W"))1b(-1L.1h.5G,-1L.1h.5F);7(2T)1b(24.2f(1L.1F.2v,1L.1h.2v),24.2f(1L.1F.2x,1L.1h.2x))}5l={3b:3b,26:b}}J 2N(a){1b(E.2o(a,"a8",P),E.2o(a,"a9",P))}J 1b(l,t){b+=4s(l)||0;3b+=4s(t)||0}K 5l}})();',62,631,'||||||this|if||||||||||||||||||||||||||||||||||||||function|return|var|length|else|data|true|for|each|false|document|type|null|style||elem||undefined|options|nodeName||browser|nodeType|event|test|arguments|display|parentNode|add|url|msie|window|indexOf|push|body|apply|css|constructor|prop|script|fn|typeof|in|isFunction|replace|extend|className|text|handle|opacity|div|complete|status|value|new|firstChild|match|filter|documentElement|show|dataType|hide|attr|offsetParent|doc|Array|trigger|table|call|break|height|try|cache|tbody|remove|success|catch|start|hidden||ready|get|split|Math|string|left|width|tagName|ret|global|while|map|safari|animate|max|toggle|toLowerCase|ownerDocument|bind|select|prototype|cur||curCSS|selected|handler|done|find|fx|duration|scrollLeft|id|scrollTop|special|opera|unit|nextSibling|stack|guid|toUpperCase|pushStack|button|none|makeArray|now|slice|target|parseFloat|border|exec|queue|isReady|events|px|fixed|timeout|delete|jsre|one|disabled|nth|step|name|overflow|inArray|removeChild|removeData|preventDefault|merge|appendChild|readyState|error|top|which|innerHTML|multiFilter|rl|trim|end|json|first|checked|async|param|elems|insertBefore|childNodes|html|encodeURIComponent|createElement|append|form|Date|unbind|color|grep|setTimeout|readyList|mouseleave|mouseenter|block|isXMLDoc|addEventListener|timers|is|password|last|runtimeStyle|getTime|xml|jQuery|domManip|ajax|src|callee|getElementsByTagName|selectedIndex|load|object|timerId|toString|has|easing|curAnim|offsetChild|args|position|stopPropagation|custom|props|orig|mozilla|accepts|clean|responseText|defaultView|visible|String|charCode|float|teardown|on|setup|nodeIndex|shift|javascript|currentStyle|application|child|RegExp|_|parseInt|previousSibling|dir|tr|state|empty|update|getAttribute|self|pos|setRequestHeader|input|jsonp|lastModified|_default|unload|ajaxSettings|unshift|getComputedStyle|styleSheets|getPropertyValue|lastToggle|mouseout|mouseover|GET|andSelf|relatedTarget|init|visibility|click|absolute|index|container|fix|outline|Number|removeAttribute|setInterval|prevObject|classFilter|not|unique|submit|file|after|windowData|deep|scroll|client|triggered|globalEval|jquery|sibling|swing|clone|results|wrapAll|triggerHandler|lastChild|dequeue|getResponseHeader|createTextNode|oldblock|checkbox|radio|handleError|fromElement|parsererror|old|00|Modified|startTime|ifModified|safari2|getWH|offsetTop|offsetLeft|active|values|getElementById|version|offset|bindReady|processData|val|contentType|ajaxSuccess|ajaxComplete|ajaxStart|serializeArray|notmodified|loaded|DOMContentLoaded|Width|ctrlKey|keyCode|clientTop|POST|clientLeft|clientX|pageX|exclusive|detachEvent|removeEventListener|swap|cloneNode|join|attachEvent|eval|ajaxStop|substr|head|parse|textarea|reset|image|zoom|odd|ajaxSend|even|before|username|prepend|expr|quickClass|uuid|quickID|quickChild|continue|textContent|appendTo|contents|evalScript|parent|defaultValue|ajaxError|setArray|compatMode|getBoundingClientRect|styleFloat|clearInterval|httpNotModified|nodeValue|100|alpha|_toggle|href|speed|throw|304|replaceWith|200|Last|colgroup|httpData|httpSuccess|beforeSend|eq|linear|concat|splice|fieldset|multiple|cssFloat|XMLHttpRequest|webkit|ActiveXObject|CSS1Compat|link|metaKey|scriptCharset|callback|col|pixelLeft|urlencoded|www|post|hasClass|getJSON|getScript|elements|serialize|black|keyup|keypress|solid|change|mousemove|mouseup|dblclick|resize|focus|blur|stylesheet|rel|doScroll|round|hover|padding|offsetHeight|mousedown|offsetWidth|Bottom|Top|keydown|clientY|Right|pageY|Left|toElement|srcElement|cancelBubble|returnValue|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|ajaxSetup|font|size|gt|lt|uFFFF|u0128|417|Boolean|inner|Height|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|contentWindow|contentDocument|wrap|iframe|children|siblings|prevAll|nextAll|prev|wrapInner|next|parents|maxLength|maxlength|readOnly|readonly|reverse|class|htmlFor|inline|able|boxModel|522|setData|compatible|with|1px|ie|getData|10000|ra|it|rv|PI|cos|userAgent|400|navigator|600|slow|Function|Object|array|stop|ig|NaN|fadeTo|option|fadeOut|fadeIn|setAttribute|slideToggle|slideUp|changed|slideDown|be|can|property|responseXML|content|1223|getAttributeNode|300|method|protocol|location|action|send|abort|cssText|th|td|cap|specified|Accept|With|colg|Requested|fast|tfoot|GMT|thead|1970|Jan|attributes|01|Thu|leg|Since|If|opt|Type|Content|embed|open|area|XMLHTTP|hr|Microsoft|onreadystatechange|onload|meta|adobeair|charset|http|1_|img|br|plain|borderLeftWidth|borderTopWidth|abbr'.split('|'),0,{})) \ No newline at end of file diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 9514a8e..62c5ece 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -7,15 +7,15 @@ module("ajax"); if ( !isLocal ) { -test("$.ajax() - success callbacks", function() { +test("jQuery.ajax() - success callbacks", function() { expect( 8 ); - $.ajaxSetup({ timeout: 0 }); + jQuery.ajaxSetup({ timeout: 0 }); stop(); setTimeout(function(){ - $('#foo').ajaxStart(function(){ + jQuery('#foo').ajaxStart(function(){ ok( true, "ajaxStart" ); }).ajaxStop(function(){ ok( true, "ajaxStop" ); @@ -30,7 +30,7 @@ test("$.ajax() - success callbacks", function() { ok( true, "ajaxSuccess" ); }); - $.ajax({ + jQuery.ajax({ url: url("data/name.html"), beforeSend: function(){ ok(true, "beforeSend"); }, success: function(){ ok(true, "success"); }, @@ -40,11 +40,11 @@ test("$.ajax() - success callbacks", function() { }, 13); }); -test("$.ajax() - error callbacks", function() { +test("jQuery.ajax() - error callbacks", function() { expect( 8 ); stop(); - $('#foo').ajaxStart(function(){ + jQuery('#foo').ajaxStart(function(){ ok( true, "ajaxStart" ); }).ajaxStop(function(){ ok( true, "ajaxStop" ); @@ -59,9 +59,9 @@ test("$.ajax() - error callbacks", function() { ok( false, "ajaxSuccess" ); }); - $.ajaxSetup({ timeout: 500 }); + jQuery.ajaxSetup({ timeout: 500 }); - $.ajax({ + jQuery.ajax({ url: url("data/name.php?wait=5"), beforeSend: function(){ ok(true, "beforeSend"); }, success: function(){ ok(false, "success"); }, @@ -70,11 +70,11 @@ test("$.ajax() - error callbacks", function() { }); }); -test("$.ajax() - disabled globals", function() { +test("jQuery.ajax() - disabled globals", function() { expect( 3 ); stop(); - $('#foo').ajaxStart(function(){ + jQuery('#foo').ajaxStart(function(){ ok( false, "ajaxStart" ); }).ajaxStop(function(){ ok( false, "ajaxStop" ); @@ -88,7 +88,7 @@ test("$.ajax() - disabled globals", function() { ok( false, "ajaxSuccess" ); }); - $.ajax({ + jQuery.ajax({ global: false, url: url("data/name.html"), beforeSend: function(){ ok(true, "beforeSend"); }, @@ -101,30 +101,30 @@ test("$.ajax() - disabled globals", function() { }); }); -test("$.ajax - xml: non-namespace elements inside namespaced elements", function() { +test("jQuery.ajax - xml: non-namespace elements inside namespaced elements", function() { expect(3); stop(); - $.ajax({ + jQuery.ajax({ url: url("data/with_fries.xml"), dataType: "xml", success: function(resp) { - equals( $("properties", resp).length, 1, 'properties in responseXML' ); - equals( $("jsconf", resp).length, 1, 'jsconf in responseXML' ); - equals( $("thing", resp).length, 2, 'things in responseXML' ); + equals( jQuery("properties", resp).length, 1, 'properties in responseXML' ); + equals( jQuery("jsconf", resp).length, 1, 'jsconf in responseXML' ); + equals( jQuery("thing", resp).length, 2, 'things in responseXML' ); start(); } }); }); -test("$.ajax - beforeSend", function() { +test("jQuery.ajax - beforeSend", function() { expect(1); stop(); var check = false; - $.ajaxSetup({ timeout: 0 }); + jQuery.ajaxSetup({ timeout: 0 }); - $.ajax({ + jQuery.ajax({ url: url("data/name.html"), beforeSend: function(xml) { check = true; @@ -136,9 +136,9 @@ test("$.ajax - beforeSend", function() { }); }); -test("$.ajax - beforeSend, cancel request (#2688)", function() { +test("jQuery.ajax - beforeSend, cancel request (#2688)", function() { expect(2); - var request = $.ajax({ + var request = jQuery.ajax({ url: url("data/name.html"), beforeSend: function() { ok( true, "beforeSend got called, canceling" ); @@ -159,7 +159,7 @@ test("$.ajax - beforeSend, cancel request (#2688)", function() { var foobar; -test("$.ajax - dataType html", function() { +test("jQuery.ajax - dataType html", function() { expect(5); stop(); @@ -172,11 +172,11 @@ test("$.ajax - dataType html", function() { start(); }; - $.ajax({ + jQuery.ajax({ dataType: "html", url: url("data/test.html"), success: function(data) { - $("#ap").html(data); + jQuery("#ap").html(data); ok( data.match(/^html text/), 'Check content for datatype html' ); setTimeout(verifyEvaluation, 600); } @@ -186,55 +186,55 @@ test("$.ajax - dataType html", function() { test("serialize()", function() { expect(6); - equals( $('#form').serialize(), + equals( jQuery('#form').serialize(), "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&select1=&select2=3&select3=1&select3=2", 'Check form serialization as query string'); - equals( $('#form :input').serialize(), + equals( jQuery('#form :input').serialize(), "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&select1=&select2=3&select3=1&select3=2", 'Check input serialization as query string'); - equals( $('#testForm').serialize(), + equals( jQuery('#testForm').serialize(), 'T3=%3F%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=', 'Check form serialization as query string'); - equals( $('#testForm :input').serialize(), + equals( jQuery('#testForm :input').serialize(), 'T3=%3F%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=', 'Check input serialization as query string'); - equals( $('#form, #testForm').serialize(), + equals( jQuery('#form, #testForm').serialize(), "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&select1=&select2=3&select3=1&select3=2&T3=%3F%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=", 'Multiple form serialization as query string'); - equals( $('#form, #testForm :input').serialize(), + equals( jQuery('#form, #testForm :input').serialize(), "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&select1=&select2=3&select3=1&select3=2&T3=%3F%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=", 'Mixed form/input serialization as query string'); }); -test("$.param()", function() { +test("jQuery.param()", function() { expect(4); var params = {foo:"bar", baz:42, quux:"All your base are belong to us"}; - equals( $.param(params), "foo=bar&baz=42&quux=All+your+base+are+belong+to+us", "simple" ); + equals( jQuery.param(params), "foo=bar&baz=42&quux=All+your+base+are+belong+to+us", "simple" ); params = {someName: [1, 2, 3], regularThing: "blah" }; - equals( $.param(params), "someName=1&someName=2&someName=3®ularThing=blah", "with array" ); + equals( jQuery.param(params), "someName=1&someName=2&someName=3®ularThing=blah", "with array" ); params = {"foo[]":["baz", 42, "All your base are belong to us"]}; - equals( $.param(params), "foo%5B%5D=baz&foo%5B%5D=42&foo%5B%5D=All+your+base+are+belong+to+us", "more array" ); + equals( jQuery.param(params), "foo%5B%5D=baz&foo%5B%5D=42&foo%5B%5D=All+your+base+are+belong+to+us", "more array" ); params = {"foo[bar]":"baz", "foo[beep]":42, "foo[quux]":"All your base are belong to us"}; - equals( $.param(params), "foo%5Bbar%5D=baz&foo%5Bbeep%5D=42&foo%5Bquux%5D=All+your+base+are+belong+to+us", "even more arrays" ); + equals( jQuery.param(params), "foo%5Bbar%5D=baz&foo%5Bbeep%5D=42&foo%5Bquux%5D=All+your+base+are+belong+to+us", "even more arrays" ); }); test("synchronous request", function() { expect(1); - ok( /^{ "data"/.test( $.ajax({url: url("data/json_obj.js"), async: false}).responseText ), "check returned text" ); + ok( /^{ "data"/.test( jQuery.ajax({url: url("data/json_obj.js"), async: false}).responseText ), "check returned text" ); }); test("synchronous request with callbacks", function() { expect(2); var result; - $.ajax({url: url("data/json_obj.js"), async: false, success: function(data) { ok(true, "sucess callback executed"); result = data; } }); + jQuery.ajax({url: url("data/json_obj.js"), async: false, success: function(data) { ok(true, "sucess callback executed"); result = data; } }); ok( /^{ "data"/.test( result ), "check returned text" ); }); @@ -249,22 +249,22 @@ test("pass-through request object", function() { var success = function() { successCount++; }; - $("#foo").ajaxError(function (e, xml, s, ex) { + jQuery("#foo").ajaxError(function (e, xml, s, ex) { errorCount++; errorEx += ": " + xml.status; }); - $("#foo").one('ajaxStop', function () { + jQuery("#foo").one('ajaxStop', function () { equals(successCount, 5, "Check all ajax calls successful"); equals(errorCount, 0, "Check no ajax errors (status" + errorEx + ")"); - $("#foo").unbind('ajaxError'); + jQuery("#foo").unbind('ajaxError'); start(); }); - ok( $.get(url(target), success), "get" ); - ok( $.post(url(target), success), "post" ); - ok( $.getScript(url("data/test.js"), success), "script" ); - ok( $.getJSON(url("data/json_obj.js"), success), "json" ); - ok( $.ajax({url: url(target), success: success}), "generic" ); + ok( jQuery.get(url(target), success), "get" ); + ok( jQuery.post(url(target), success), "post" ); + ok( jQuery.getScript(url("data/test.js"), success), "script" ); + ok( jQuery.getJSON(url("data/json_obj.js"), success), "json" ); + ok( jQuery.ajax({url: url(target), success: success}), "generic" ); }); test("ajax cache", function () { @@ -273,7 +273,7 @@ test("ajax cache", function () { var count = 0; - $("#firstp").bind("ajaxSuccess", function (e, xml, s) { + jQuery("#firstp").bind("ajaxSuccess", function (e, xml, s) { var re = /_=(.*?)(&|$)/g; var oldOne = null; for (var i = 0; i < 6; i++) { @@ -289,12 +289,12 @@ test("ajax cache", function () { start(); }); - ok( $.ajax({url: "data/text.php", cache:false}), "test with no parameters" ); - ok( $.ajax({url: "data/text.php?pizza=true", cache:false}), "test with 1 parameter" ); - ok( $.ajax({url: "data/text.php?_=tobereplaced555", cache:false}), "test with _= parameter" ); - ok( $.ajax({url: "data/text.php?pizza=true&_=tobereplaced555", cache:false}), "test with 1 parameter plus _= one" ); - ok( $.ajax({url: "data/text.php?_=tobereplaced555&tv=false", cache:false}), "test with 1 parameter plus _= one before it" ); - ok( $.ajax({url: "data/text.php?name=David&_=tobereplaced555&washere=true", cache:false}), "test with 2 parameters surrounding _= one" ); + ok( jQuery.ajax({url: "data/text.php", cache:false}), "test with no parameters" ); + ok( jQuery.ajax({url: "data/text.php?pizza=true", cache:false}), "test with 1 parameter" ); + ok( jQuery.ajax({url: "data/text.php?_=tobereplaced555", cache:false}), "test with _= parameter" ); + ok( jQuery.ajax({url: "data/text.php?pizza=true&_=tobereplaced555", cache:false}), "test with 1 parameter plus _= one" ); + ok( jQuery.ajax({url: "data/text.php?_=tobereplaced555&tv=false", cache:false}), "test with 1 parameter plus _= one before it" ); + ok( jQuery.ajax({url: "data/text.php?name=David&_=tobereplaced555&washere=true", cache:false}), "test with 2 parameters surrounding _= one" ); }); test("global ajaxSettings", function() { @@ -304,16 +304,16 @@ test("global ajaxSettings", function() { var orig = { url: "data/with_fries.xml" }; var t; - $.ajaxSetup({ data: {foo: 'bar', bar: 'BAR'} }); + jQuery.ajaxSetup({ data: {foo: 'bar', bar: 'BAR'} }); t = jQuery.extend({}, orig); t.data = {}; - $.ajax(t); + jQuery.ajax(t); ok( t.url.indexOf('foo') > -1 && t.url.indexOf('bar') > -1, "Check extending {}" ); t = jQuery.extend({}, orig); t.data = { zoo: 'a', ping: 'b' }; - $.ajax(t); + jQuery.ajax(t); ok( t.url.indexOf('ping') > -1 && t.url.indexOf('zoo') > -1 && t.url.indexOf('foo') > -1 && t.url.indexOf('bar') > -1, "Check extending { zoo: 'a', ping: 'b' }" ); jQuery.ajaxSettings = tmp; @@ -322,14 +322,14 @@ test("global ajaxSettings", function() { test("load(String)", function() { expect(1); stop(true); // check if load can be called with only url - $('#first').load("data/name.html", start); + jQuery('#first').load("data/name.html", start); }); test("load('url selector')", function() { expect(1); stop(true); // check if load can be called with only url - $('#first').load("data/test3.html div.user", function(){ - equals( $(this).children("div").length, 2, "Verify that specific elements were injected" ); + jQuery('#first').load("data/test3.html div.user", function(){ + equals( jQuery(this).children("div").length, 2, "Verify that specific elements were injected" ); start(); }); }); @@ -337,21 +337,21 @@ test("load('url selector')", function() { test("load(String, Function) with ajaxSetup on dataType json, see #2046", function() { expect(1); stop(); - $.ajaxSetup({ dataType: "json" }); - $("#first").ajaxComplete(function (e, xml, s) { + jQuery.ajaxSetup({ dataType: "json" }); + jQuery("#first").ajaxComplete(function (e, xml, s) { equals( s.dataType, "html", "Verify the load() dataType was html" ); - $("#first").unbind("ajaxComplete"); - $.ajaxSetup({ dataType: "" }); + jQuery("#first").unbind("ajaxComplete"); + jQuery.ajaxSetup({ dataType: "" }); start(); }); - $('#first').load("data/test3.html"); + jQuery('#first').load("data/test3.html"); }); test("load(String, Function) - simple: inject text into DOM", function() { expect(2); stop(); - $('#first').load(url("data/name.html"), function() { - ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); + jQuery('#first').load(url("data/name.html"), function() { + ok( /^ERROR/.test(jQuery('#first').text()), 'Check if content was injected into the DOM' ); start(); }); }); @@ -363,12 +363,12 @@ test("load(String, Function) - check scripts", function() { window.foobar = null; var verifyEvaluation = function() { equals( foobar, "bar", 'Check if script src was evaluated after load' ); - equals( $('#ap').html(), 'bar', 'Check if script evaluation has modified DOM'); + equals( jQuery('#ap').html(), 'bar', 'Check if script evaluation has modified DOM'); start(); }; - $('#first').load(url('data/test.html'), function() { - ok( $('#first').html().match(/^html text/), 'Check content after loading html' ); - equals( $('#foo').html(), 'foo', 'Check if script evaluation has modified DOM'); + jQuery('#first').load(url('data/test.html'), function() { + ok( jQuery('#first').html().match(/^html text/), 'Check content after loading html' ); + equals( jQuery('#foo').html(), 'foo', 'Check if script evaluation has modified DOM'); equals( testFoo, "foo", 'Check if script was evaluated after load' ); setTimeout(verifyEvaluation, 600); }); @@ -378,8 +378,8 @@ test("load(String, Function) - check file with only a script tag", function() { expect(3); stop(); testFoo = undefined; - $('#first').load(url('data/test2.html'), function() { - equals( $('#foo').html(), 'foo', 'Check if script evaluation has modified DOM'); + jQuery('#first').load(url('data/test2.html'), function() { + equals( jQuery('#foo').html(), 'foo', 'Check if script evaluation has modified DOM'); equals( testFoo, "foo", 'Check if script was evaluated after load' ); start(); }); @@ -389,8 +389,8 @@ test("load(String, Object, Function)", function() { expect(2); stop(); - $('
').load(url('data/params_html.php'), { foo:3, bar:'ok' }, function() { - var $post = $(this).find('#post'); + jQuery('
').load(url('data/params_html.php'), { foo:3, bar:'ok' }, function() { + var $post = jQuery(this).find('#post'); equals( $post.find('#foo').text(), '3', 'Check if a hash of data is passed correctly'); equals( $post.find('#bar').text(), 'ok', 'Check if a hash of data is passed correctly'); start(); @@ -401,21 +401,21 @@ test("load(String, String, Function)", function() { expect(2); stop(); - $('
').load(url('data/params_html.php'), 'foo=3&bar=ok', function() { - var $get = $(this).find('#get'); + jQuery('
').load(url('data/params_html.php'), 'foo=3&bar=ok', function() { + var $get = jQuery(this).find('#get'); equals( $get.find('#foo').text(), '3', 'Check if a string of data is passed correctly'); equals( $get.find('#bar').text(), 'ok', 'Check if a of data is passed correctly'); start(); }); }); -test("$.get(String, Hash, Function) - parse xml and use text() on nodes", function() { +test("jQuery.get(String, Hash, Function) - parse xml and use text() on nodes", function() { expect(2); stop(); - $.get(url('data/dashboard.xml'), function(xml) { + jQuery.get(url('data/dashboard.xml'), function(xml) { var content = []; - $('tab', xml).each(function() { - content.push($(this).text()); + jQuery('tab', xml).each(function() { + content.push(jQuery(this).text()); }); equals( content[0], 'blabla', 'Check first tab'); equals( content[1], 'blublu', 'Check second tab'); @@ -423,23 +423,23 @@ test("$.get(String, Hash, Function) - parse xml and use text() on nodes", functi }); }); -test("$.getScript(String, Function) - with callback", function() { +test("jQuery.getScript(String, Function) - with callback", function() { expect(2); stop(); window.foobar = null; - $.getScript(url("data/test.js"), function() { + jQuery.getScript(url("data/test.js"), function() { equals( foobar, "bar", 'Check if script was evaluated' ); setTimeout(start, 100); }); }); -test("$.getScript(String, Function) - no callback", function() { +test("jQuery.getScript(String, Function) - no callback", function() { expect(1); stop(true); - $.getScript(url("data/test.js"), start); + jQuery.getScript(url("data/test.js"), start); }); -test("$.ajax() - JSONP, Local", function() { +test("jQuery.ajax() - JSONP, Local", function() { expect(7); var count = 0; @@ -447,7 +447,7 @@ test("$.ajax() - JSONP, Local", function() { stop(); - $.ajax({ + jQuery.ajax({ url: "data/jsonp.php", dataType: "jsonp", success: function(data){ @@ -460,7 +460,7 @@ test("$.ajax() - JSONP, Local", function() { } }); - $.ajax({ + jQuery.ajax({ url: "data/jsonp.php?callback=?", dataType: "jsonp", success: function(data){ @@ -473,7 +473,7 @@ test("$.ajax() - JSONP, Local", function() { } }); - $.ajax({ + jQuery.ajax({ url: "data/jsonp.php", dataType: "jsonp", data: "callback=?", @@ -487,7 +487,7 @@ test("$.ajax() - JSONP, Local", function() { } }); - $.ajax({ + jQuery.ajax({ url: "data/jsonp.php", dataType: "jsonp", jsonp: "callback", @@ -501,7 +501,7 @@ test("$.ajax() - JSONP, Local", function() { } }); - $.ajax({ + jQuery.ajax({ type: "POST", url: "data/jsonp.php", dataType: "jsonp", @@ -515,7 +515,7 @@ test("$.ajax() - JSONP, Local", function() { } }); - $.ajax({ + jQuery.ajax({ type: "POST", url: "data/jsonp.php", data: "callback=?", @@ -530,7 +530,7 @@ test("$.ajax() - JSONP, Local", function() { } }); - $.ajax({ + jQuery.ajax({ type: "POST", url: "data/jsonp.php", jsonp: "callback", @@ -546,7 +546,7 @@ test("$.ajax() - JSONP, Local", function() { }); }); -test("$.ajax() - JSONP, Remote", function() { +test("jQuery.ajax() - JSONP, Remote", function() { expect(4); var count = 0; @@ -556,7 +556,7 @@ test("$.ajax() - JSONP, Remote", function() { stop(); - $.ajax({ + jQuery.ajax({ url: base + "data/jsonp.php", dataType: "jsonp", success: function(data){ @@ -569,7 +569,7 @@ test("$.ajax() - JSONP, Remote", function() { } }); - $.ajax({ + jQuery.ajax({ url: base + "data/jsonp.php?callback=?", dataType: "jsonp", success: function(data){ @@ -582,7 +582,7 @@ test("$.ajax() - JSONP, Remote", function() { } }); - $.ajax({ + jQuery.ajax({ url: base + "data/jsonp.php", dataType: "jsonp", data: "callback=?", @@ -596,7 +596,7 @@ test("$.ajax() - JSONP, Remote", function() { } }); - $.ajax({ + jQuery.ajax({ url: base + "data/jsonp.php", dataType: "jsonp", jsonp: "callback", @@ -611,7 +611,7 @@ test("$.ajax() - JSONP, Remote", function() { }); }); -test("$.ajax() - script, Remote", function() { +test("jQuery.ajax() - script, Remote", function() { expect(2); var base = window.location.href.replace(/\?.*$/, ""); @@ -619,7 +619,7 @@ test("$.ajax() - script, Remote", function() { stop(); window.foobar = null; - $.ajax({ + jQuery.ajax({ url: base + "data/test.js", dataType: "script", success: function(data){ @@ -629,7 +629,7 @@ test("$.ajax() - script, Remote", function() { }); }); -test("$.ajax() - script, Remote with POST", function() { +test("jQuery.ajax() - script, Remote with POST", function() { expect(3); var base = window.location.href.replace(/\?.*$/, ""); @@ -637,7 +637,7 @@ test("$.ajax() - script, Remote with POST", function() { stop(); window.foobar = null; - $.ajax({ + jQuery.ajax({ url: base + "data/test.js", type: "POST", dataType: "script", @@ -649,7 +649,7 @@ test("$.ajax() - script, Remote with POST", function() { }); }); -test("$.ajax() - script, Remote with scheme-less URL", function() { +test("jQuery.ajax() - script, Remote with scheme-less URL", function() { expect(2); var base = window.location.href.replace(/\?.*$/, ""); @@ -658,7 +658,7 @@ test("$.ajax() - script, Remote with scheme-less URL", function() { stop(); window.foobar = null; - $.ajax({ + jQuery.ajax({ url: base + "data/test.js", dataType: "script", success: function(data){ @@ -668,10 +668,10 @@ test("$.ajax() - script, Remote with scheme-less URL", function() { }); }); -test("$.getJSON(String, Hash, Function) - JSON array", function() { +test("jQuery.getJSON(String, Hash, Function) - JSON array", function() { expect(4); stop(); - $.getJSON(url("data/json.php"), {json: "array"}, function(json) { + jQuery.getJSON(url("data/json.php"), {json: "array"}, function(json) { equals( json[0].name, 'John', 'Check JSON: first, name' ); equals( json[0].age, 21, 'Check JSON: first, age' ); equals( json[1].name, 'Peter', 'Check JSON: second, name' ); @@ -680,60 +680,60 @@ test("$.getJSON(String, Hash, Function) - JSON array", function() { }); }); -test("$.getJSON(String, Function) - JSON object", function() { +test("jQuery.getJSON(String, Function) - JSON object", function() { expect(2); stop(); - $.getJSON(url("data/json.php"), function(json) { + jQuery.getJSON(url("data/json.php"), function(json) { equals( json.data.lang, 'en', 'Check JSON: lang' ); equals( json.data.length, 25, 'Check JSON: length' ); start(); }); }); -test("$.getJSON(String, Function) - JSON object with absolute url to local content", function() { +test("jQuery.getJSON(String, Function) - JSON object with absolute url to local content", function() { expect(2); var base = window.location.href.replace(/\?.*$/, ""); stop(); - $.getJSON(url(base + "data/json.php"), function(json) { + jQuery.getJSON(url(base + "data/json.php"), function(json) { equals( json.data.lang, 'en', 'Check JSON: lang' ); equals( json.data.length, 25, 'Check JSON: length' ); start(); }); }); -test("$.post(String, Hash, Function) - simple with xml", function() { +test("jQuery.post(String, Hash, Function) - simple with xml", function() { expect(4); stop(); - $.post(url("data/name.php"), {xml: "5-2"}, function(xml){ - $('math', xml).each(function() { - equals( $('calculation', this).text(), '5-2', 'Check for XML' ); - equals( $('result', this).text(), '3', 'Check for XML' ); + jQuery.post(url("data/name.php"), {xml: "5-2"}, function(xml){ + jQuery('math', xml).each(function() { + equals( jQuery('calculation', this).text(), '5-2', 'Check for XML' ); + equals( jQuery('result', this).text(), '3', 'Check for XML' ); }); }); - $.post(url("data/name.php?xml=5-2"), {}, function(xml){ - $('math', xml).each(function() { - equals( $('calculation', this).text(), '5-2', 'Check for XML' ); - equals( $('result', this).text(), '3', 'Check for XML' ); + jQuery.post(url("data/name.php?xml=5-2"), {}, function(xml){ + jQuery('math', xml).each(function() { + equals( jQuery('calculation', this).text(), '5-2', 'Check for XML' ); + equals( jQuery('result', this).text(), '3', 'Check for XML' ); }); start(); }); }); -test("$.ajaxSetup({timeout: Number}) - with global timeout", function() { +test("jQuery.ajaxSetup({timeout: Number}) - with global timeout", function() { stop(); var passed = 0; - $.ajaxSetup({timeout: 1000}); + jQuery.ajaxSetup({timeout: 1000}); var pass = function() { passed++; if ( passed == 2 ) { ok( true, 'Check local and global callbacks after timeout' ); - $('#main').unbind("ajaxError"); + jQuery('#main').unbind("ajaxError"); start(); } }; @@ -743,9 +743,9 @@ test("$.ajaxSetup({timeout: Number}) - with global timeout", function() { start(); }; - $('#main').ajaxError(pass); + jQuery('#main').ajaxError(pass); - $.ajax({ + jQuery.ajax({ type: "GET", url: url("data/name.php?wait=5"), error: pass, @@ -753,14 +753,14 @@ test("$.ajaxSetup({timeout: Number}) - with global timeout", function() { }); // reset timeout - $.ajaxSetup({timeout: 0}); + jQuery.ajaxSetup({timeout: 0}); }); -test("$.ajaxSetup({timeout: Number}) with localtimeout", function() { +test("jQuery.ajaxSetup({timeout: Number}) with localtimeout", function() { stop(); - $.ajaxSetup({timeout: 50}); + jQuery.ajaxSetup({timeout: 50}); - $.ajax({ + jQuery.ajax({ type: "GET", timeout: 5000, url: url("data/name.php?wait=1"), @@ -775,13 +775,13 @@ test("$.ajaxSetup({timeout: Number}) with localtimeout", function() { }); // reset timeout - $.ajaxSetup({timeout: 0}); + jQuery.ajaxSetup({timeout: 0}); }); -test("$.ajax - simple get", function() { +test("jQuery.ajax - simple get", function() { expect(1); stop(); - $.ajax({ + jQuery.ajax({ type: "GET", url: url("data/name.php?name=foo"), success: function(msg){ @@ -791,10 +791,10 @@ test("$.ajax - simple get", function() { }); }); -test("$.ajax - simple post", function() { +test("jQuery.ajax - simple post", function() { expect(1); stop(); - $.ajax({ + jQuery.ajax({ type: "POST", url: url("data/name.php"), data: "name=peter", @@ -808,19 +808,19 @@ test("$.ajax - simple post", function() { test("ajaxSetup()", function() { expect(1); stop(); - $.ajaxSetup({ + jQuery.ajaxSetup({ url: url("data/name.php?name=foo"), success: function(msg){ equals( msg, 'bar', 'Check for GET' ); start(); } }); - $.ajax(); + jQuery.ajax(); }); test("custom timeout does not set error message when timeout occurs, see #970", function() { stop(); - $.ajax({ + jQuery.ajax({ url: "data/name.php?wait=10", timeout: 500, error: function(request, status) { @@ -833,7 +833,7 @@ test("custom timeout does not set error message when timeout occurs, see #970", test("data option: evaluate function values (#2806)", function() { stop(); - $.ajax({ + jQuery.ajax({ url: "data/echoQuery.php", data: { key: function() { diff --git a/test/unit/core.js b/test/unit/core.js index 37eee5d..eba9ce5 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -8,20 +8,20 @@ test("Basic requirements", function() { ok( document.getElementsByTagName, "getElementsByTagName" ); ok( RegExp, "RegExp" ); ok( jQuery, "jQuery" ); - ok( $, "$()" ); + ok( $, "$" ); }); -test("$()", function() { +test("jQuery()", function() { expect(8); - var main = $("#main"); - isSet( $("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" ); + var main = jQuery("#main"); + isSet( jQuery("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" ); /* // disabled since this test was doing nothing. i tried to fix it but i'm not sure // what the expected behavior should even be. FF returns "\n" for the text node // make sure this is handled - var crlfContainer = $('

\r\n

'); + var crlfContainer = jQuery('

\r\n

'); var x = crlfContainer.contents().get(0).nodeValue; equals( x, what???, "Check for \\r and \\n in jQuery()" ); */ @@ -29,27 +29,27 @@ test("$()", function() { /* // Disabled until we add this functionality in var pass = true; try { - $("
Testing
").appendTo(document.getElementById("iframe").contentDocument.body); + jQuery("
Testing
").appendTo(document.getElementById("iframe").contentDocument.body); } catch(e){ pass = false; } - ok( pass, "$('<tag>') needs optional document parameter to ease cross-frame DOM wrangling, see #968" );*/ + ok( pass, "jQuery('<tag>') needs optional document parameter to ease cross-frame DOM wrangling, see #968" );*/ - var code = $(""); + var code = jQuery(""); equals( code.length, 1, "Correct number of elements generated for code" ); - var img = $(""); + var img = jQuery(""); equals( img.length, 1, "Correct number of elements generated for img" ); - var div = $("

"); + var div = jQuery("

"); equals( div.length, 4, "Correct number of elements generated for div hr code b" ); // can actually yield more than one, when iframes are included, the window is an array as well - equals( $(window).length, 1, "Correct number of elements generated for window" ); + equals( jQuery(window).length, 1, "Correct number of elements generated for window" ); - equals( $(document).length, 1, "Correct number of elements generated for document" ); + equals( jQuery(document).length, 1, "Correct number of elements generated for document" ); - equals( $([1,2,3]).get(1), 2, "Test passing an array to the factory" ); + equals( jQuery([1,2,3]).get(1), 2, "Test passing an array to the factory" ); - equals( $(document.body).get(0), $('body').get(0), "Test passing an html node to the factory" ); + equals( jQuery(document.body).get(0), jQuery('body').get(0), "Test passing an html node to the factory" ); }); test("browser", function() { @@ -91,22 +91,19 @@ test("browser", function() { test("noConflict", function() { expect(6); - var old = jQuery; - var newjQuery = jQuery.noConflict(); + var $$ = jQuery; - equals( newjQuery, old, "noConflict returned the jQuery object" ); - equals( jQuery, old, "Make sure jQuery wasn't touched." ); - equals( $, "$", "Make sure $ was reverted." ); + equals( jQuery, jQuery.noConflict(), "noConflict returned the jQuery object" ); + equals( jQuery, $$, "Make sure jQuery wasn't touched." ); + equals( $, original$, "Make sure $ was reverted." ); - jQuery = $ = old; + jQuery = $ = $$; - newjQuery = jQuery.noConflict(true); + equals( jQuery.noConflict(true), $$, "noConflict returned the jQuery object" ); + equals( jQuery, originaljQuery, "Make sure jQuery was reverted." ); + equals( $, original$, "Make sure $ was reverted." ); - equals( newjQuery, old, "noConflict returned the jQuery object" ); - equals( jQuery, "jQuery", "Make sure jQuery was reverted." ); - equals( $, "$", "Make sure $ was reverted." ); - - jQuery = $ = old; + jQuery = $$; }); test("isFunction", function() { @@ -196,45 +193,45 @@ test("isFunction", function() { var foo = false; -test("$('html')", function() { +test("jQuery('html')", function() { expect(6); reset(); foo = false; - var s = $("")[0]; + var s = jQuery("")[0]; ok( s, "Creating a script" ); ok( !foo, "Make sure the script wasn't executed prematurely" ); - $("body").append(s); + jQuery("body").append(s); ok( foo, "Executing a scripts contents in the right context" ); reset(); - ok( $("")[0], "Creating a link" ); + ok( jQuery("")[0], "Creating a link" ); reset(); - var j = $("hi there "); + var j = jQuery("hi there "); ok( j.length >= 2, "Check node,textnode,comment creation (some browsers delete comments)" ); - ok( !$("")[0].selected, "Make sure that options are auto-selected #2050" ); + ok( !jQuery("")[0].selected, "Make sure that options are auto-selected #2050" ); }); -test("$('html', context)", function() { +test("jQuery('html', context)", function() { expect(1); - var $div = $("
"); - var $span = $("", $div); + var $div = jQuery("
"); + var $span = jQuery("", $div); equals($span.length, 1, "Verify a span created with a div context works, #1763"); }); if ( !isLocal ) { -test("$(selector, xml).text(str) - Loaded via XML document", function() { +test("jQuery(selector, xml).text(str) - Loaded via XML document", function() { expect(2); stop(); - $.get('data/dashboard.xml', function(xml) { + jQuery.get('data/dashboard.xml', function(xml) { // tests for #1419 where IE was a problem - equals( $("tab:first", xml).text(), "blabla", "Verify initial text correct" ); - $("tab:first", xml).text("newtext"); - equals( $("tab:first", xml).text(), "newtext", "Verify new text correct" ); + equals( jQuery("tab:first", xml).text(), "blabla", "Verify initial text correct" ); + jQuery("tab:first", xml).text("newtext"); + equals( jQuery("tab:first", xml).text(), "newtext", "Verify new text correct" ); start(); }); }); @@ -242,55 +239,55 @@ test("$(selector, xml).text(str) - Loaded via XML document", function() { test("length", function() { expect(1); - equals( $("p").length, 6, "Get Number of Elements Found" ); + equals( jQuery("p").length, 6, "Get Number of Elements Found" ); }); test("size()", function() { expect(1); - equals( $("p").size(), 6, "Get Number of Elements Found" ); + equals( jQuery("p").size(), 6, "Get Number of Elements Found" ); }); test("get()", function() { expect(1); - isSet( $("p").get(), q("firstp","ap","sndp","en","sap","first"), "Get All Elements" ); + isSet( jQuery("p").get(), q("firstp","ap","sndp","en","sap","first"), "Get All Elements" ); }); test("get(Number)", function() { expect(1); - equals( $("p").get(0), document.getElementById("firstp"), "Get A Single Element" ); + equals( jQuery("p").get(0), document.getElementById("firstp"), "Get A Single Element" ); }); test("add(String|Element|Array|undefined)", function() { expect(12); - isSet( $("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" ); - isSet( $("#sndp").add( $("#en")[0] ).add( $("#sap") ).get(), q("sndp", "en", "sap"), "Check elements from document" ); - ok( $([]).add($("#form")[0].elements).length >= 13, "Check elements from array" ); + isSet( jQuery("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" ); + isSet( jQuery("#sndp").add( jQuery("#en")[0] ).add( jQuery("#sap") ).get(), q("sndp", "en", "sap"), "Check elements from document" ); + ok( jQuery([]).add(jQuery("#form")[0].elements).length >= 13, "Check elements from array" ); - // For the time being, we're discontinuing support for $(form.elements) since it's ambiguous in IE - // use $([]).add(form.elements) instead. - //equals( $([]).add($("#form")[0].elements).length, $($("#form")[0].elements).length, "Array in constructor must equals array in add()" ); + // For the time being, we're discontinuing support for jQuery(form.elements) since it's ambiguous in IE + // use jQuery([]).add(form.elements) instead. + //equals( jQuery([]).add(jQuery("#form")[0].elements).length, jQuery(jQuery("#form")[0].elements).length, "Array in constructor must equals array in add()" ); - var x = $([]).add($("

xxx

")).add($("

xxx

")); + var x = jQuery([]).add(jQuery("

xxx

")).add(jQuery("

xxx

")); equals( x[0].id, "x1", "Check on-the-fly element1" ); equals( x[1].id, "x2", "Check on-the-fly element2" ); - var x = $([]).add("

xxx

").add("

xxx

"); + var x = jQuery([]).add("

xxx

").add("

xxx

"); equals( x[0].id, "x1", "Check on-the-fly element1" ); equals( x[1].id, "x2", "Check on-the-fly element2" ); var notDefined; - equals( $([]).add(notDefined).length, 0, "Check that undefined adds nothing" ); + equals( jQuery([]).add(notDefined).length, 0, "Check that undefined adds nothing" ); // Added after #2811 - equals( $([]).add([window,document,document.body,document]).length, 3, "Pass an array" ); - equals( $(document).add(document).length, 1, "Check duplicated elements" ); - equals( $(window).add(window).length, 1, "Check duplicated elements using the window" ); - ok( $([]).add( document.getElementById('form') ).length >= 13, "Add a form (adds the elements)" ); + equals( jQuery([]).add([window,document,document.body,document]).length, 3, "Pass an array" ); + equals( jQuery(document).add(document).length, 1, "Check duplicated elements" ); + equals( jQuery(window).add(window).length, 1, "Check duplicated elements using the window" ); + ok( jQuery([]).add( document.getElementById('form') ).length >= 13, "Add a form (adds the elements)" ); }); test("each(Function)", function() { expect(1); - var div = $("div"); + var div = jQuery("div"); div.each(function(){this.foo = 'zoo';}); var pass = true; for ( var i = 0; i < div.size(); i++ ) { @@ -302,8 +299,8 @@ test("each(Function)", function() { test("index(Object)", function() { expect(10); - var elements = $([window, document]), - inputElements = $('#radio1,#radio2,#check1,#check2'); + var elements = jQuery([window, document]), + inputElements = jQuery('#radio1,#radio2,#check1,#check2'); equals( elements.index(window), 0, "Check for index of elements" ); equals( elements.index(document), 1, "Check for index of elements" ); @@ -321,32 +318,32 @@ test("index(Object)", function() { test("attr(String)", function() { expect(26); - equals( $('#text1').attr('value'), "Test", 'Check for value attribute' ); - equals( $('#text1').attr('value', "Test2").attr('defaultValue'), "Test", 'Check for defaultValue attribute' ); - equals( $('#text1').attr('type'), "text", 'Check for type attribute' ); - equals( $('#radio1').attr('type'), "radio", 'Check for type attribute' ); - equals( $('#check1').attr('type'), "checkbox", 'Check for type attribute' ); - equals( $('#simon1').attr('rel'), "bookmark", 'Check for rel attribute' ); - equals( $('#google').attr('title'), "Google!", 'Check for title attribute' ); - equals( $('#mark').attr('hreflang'), "en", 'Check for hreflang attribute' ); - equals( $('#en').attr('lang'), "en", 'Check for lang attribute' ); - equals( $('#simon').attr('class'), "blog link", 'Check for class attribute' ); - equals( $('#name').attr('name'), "name", 'Check for name attribute' ); - equals( $('#text1').attr('name'), "action", 'Check for name attribute' ); - ok( $('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' ); - equals( $('#text1').attr('maxlength'), '30', 'Check for maxlength attribute' ); - equals( $('#text1').attr('maxLength'), '30', 'Check for maxLength attribute' ); - equals( $('#area1').attr('maxLength'), '30', 'Check for maxLength attribute' ); - equals( $('#select2').attr('selectedIndex'), 3, 'Check for selectedIndex attribute' ); - equals( $('#foo').attr('nodeName'), 'DIV', 'Check for nodeName attribute' ); - equals( $('#foo').attr('tagName'), 'DIV', 'Check for tagName attribute' ); - - $('').attr('href', '#5').appendTo('#main'); // using innerHTML in IE causes href attribute to be serialized to the full path - equals( $('#tAnchor5').attr('href'), "#5", 'Check for non-absolute href (an anchor)' ); + equals( jQuery('#text1').attr('value'), "Test", 'Check for value attribute' ); + equals( jQuery('#text1').attr('value', "Test2").attr('defaultValue'), "Test", 'Check for defaultValue attribute' ); + equals( jQuery('#text1').attr('type'), "text", 'Check for type attribute' ); + equals( jQuery('#radio1').attr('type'), "radio", 'Check for type attribute' ); + equals( jQuery('#check1').attr('type'), "checkbox", 'Check for type attribute' ); + equals( jQuery('#simon1').attr('rel'), "bookmark", 'Check for rel attribute' ); + equals( jQuery('#google').attr('title'), "Google!", 'Check for title attribute' ); + equals( jQuery('#mark').attr('hreflang'), "en", 'Check for hreflang attribute' ); + equals( jQuery('#en').attr('lang'), "en", 'Check for lang attribute' ); + equals( jQuery('#simon').attr('class'), "blog link", 'Check for class attribute' ); + equals( jQuery('#name').attr('name'), "name", 'Check for name attribute' ); + equals( jQuery('#text1').attr('name'), "action", 'Check for name attribute' ); + ok( jQuery('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' ); + equals( jQuery('#text1').attr('maxlength'), '30', 'Check for maxlength attribute' ); + equals( jQuery('#text1').attr('maxLength'), '30', 'Check for maxLength attribute' ); + equals( jQuery('#area1').attr('maxLength'), '30', 'Check for maxLength attribute' ); + equals( jQuery('#select2').attr('selectedIndex'), 3, 'Check for selectedIndex attribute' ); + equals( jQuery('#foo').attr('nodeName'), 'DIV', 'Check for nodeName attribute' ); + equals( jQuery('#foo').attr('tagName'), 'DIV', 'Check for tagName attribute' ); + + jQuery('').attr('href', '#5').appendTo('#main'); // using innerHTML in IE causes href attribute to be serialized to the full path + equals( jQuery('#tAnchor5').attr('href'), "#5", 'Check for non-absolute href (an anchor)' ); // Related to [5574] and [5683] - var body = document.body, $body = $(body); + var body = document.body, $body = jQuery(body); ok( $body.attr('foo') === undefined, 'Make sure that a non existent attribute returns undefined' ); ok( $body.attr('nextSibling') === null, 'Make sure a null expando returns null' ); @@ -370,9 +367,9 @@ if ( !isLocal ) { test("attr(String) in XML Files", function() { expect(2); stop(); - $.get("data/dashboard.xml", function(xml) { - equals( $("locations", xml).attr("class"), "foo", "Check class attribute in XML document" ); - equals( $("location", xml).attr("for"), "bar", "Check for attribute in XML document" ); + jQuery.get("data/dashboard.xml", function(xml) { + equals( jQuery("locations", xml).attr("class"), "foo", "Check class attribute in XML document" ); + equals( jQuery("location", xml).attr("for"), "bar", "Check for attribute in XML document" ); start(); }); }); @@ -380,14 +377,14 @@ if ( !isLocal ) { test("attr(String, Function)", function() { expect(2); - equals( $('#text1').attr('value', function() { return this.id })[0].value, "text1", "Set value from id" ); - equals( $('#text1').attr('title', function(i) { return i }).attr('title'), "0", "Set value with an index"); + equals( jQuery('#text1').attr('value', function() { return this.id })[0].value, "text1", "Set value from id" ); + equals( jQuery('#text1').attr('title', function(i) { return i }).attr('title'), "0", "Set value with an index"); }); test("attr(Hash)", function() { expect(1); var pass = true; - $("div").attr({foo: 'baz', zoo: 'ping'}).each(function(){ + jQuery("div").attr({foo: 'baz', zoo: 'ping'}).each(function(){ if ( this.getAttribute('foo') != "baz" && this.getAttribute('zoo') != "ping" ) pass = false; }); ok( pass, "Set Multiple Attributes" ); @@ -395,7 +392,7 @@ test("attr(Hash)", function() { test("attr(String, Object)", function() { expect(17); - var div = $("div").attr("foo", "bar"); + var div = jQuery("div").attr("foo", "bar"); fail = false; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).getAttribute('foo') != "bar" ){ @@ -405,33 +402,33 @@ test("attr(String, Object)", function() { } equals( fail, false, "Set Attribute, the #"+fail+" element didn't get the attribute 'foo'" ); - ok( $("#foo").attr({"width": null}), "Try to set an attribute to nothing" ); + ok( jQuery("#foo").attr({"width": null}), "Try to set an attribute to nothing" ); - $("#name").attr('name', 'something'); - equals( $("#name").attr('name'), 'something', 'Set name attribute' ); - $("#check2").attr('checked', true); + jQuery("#name").attr('name', 'something'); + equals( jQuery("#name").attr('name'), 'something', 'Set name attribute' ); + jQuery("#check2").attr('checked', true); equals( document.getElementById('check2').checked, true, 'Set checked attribute' ); - $("#check2").attr('checked', false); + jQuery("#check2").attr('checked', false); equals( document.getElementById('check2').checked, false, 'Set checked attribute' ); - $("#text1").attr('readonly', true); + jQuery("#text1").attr('readonly', true); equals( document.getElementById('text1').readOnly, true, 'Set readonly attribute' ); - $("#text1").attr('readonly', false); + jQuery("#text1").attr('readonly', false); equals( document.getElementById('text1').readOnly, false, 'Set readonly attribute' ); - $("#name").attr('maxlength', '5'); + jQuery("#name").attr('maxlength', '5'); equals( document.getElementById('name').maxLength, '5', 'Set maxlength attribute' ); - $("#name").attr('maxLength', '10'); + jQuery("#name").attr('maxLength', '10'); equals( document.getElementById('name').maxLength, '10', 'Set maxlength attribute' ); // for #1070 - $("#name").attr('someAttr', '0'); - equals( $("#name").attr('someAttr'), '0', 'Set attribute to a string of "0"' ); - $("#name").attr('someAttr', 0); - equals( $("#name").attr('someAttr'), 0, 'Set attribute to the number 0' ); - $("#name").attr('someAttr', 1); - equals( $("#name").attr('someAttr'), 1, 'Set attribute to the number 1' ); + jQuery("#name").attr('someAttr', '0'); + equals( jQuery("#name").attr('someAttr'), '0', 'Set attribute to a string of "0"' ); + jQuery("#name").attr('someAttr', 0); + equals( jQuery("#name").attr('someAttr'), 0, 'Set attribute to the number 0' ); + jQuery("#name").attr('someAttr', 1); + equals( jQuery("#name").attr('someAttr'), 1, 'Set attribute to the number 1' ); // using contents will get comments regular, text, and comment nodes - var j = $("#nonnodes").contents(); + var j = jQuery("#nonnodes").contents(); j.attr("name", "attrvalue"); equals( j.attr("name"), "attrvalue", "Check node,textnode,comment for attr" ); @@ -439,35 +436,35 @@ test("attr(String, Object)", function() { reset(); - var type = $("#check2").attr('type'); + var type = jQuery("#check2").attr('type'); var thrown = false; try { - $("#check2").attr('type','hidden'); + jQuery("#check2").attr('type','hidden'); } catch(e) { thrown = true; } ok( thrown, "Exception thrown when trying to change type property" ); - equals( type, $("#check2").attr('type'), "Verify that you can't change the type of an input element" ); + equals( type, jQuery("#check2").attr('type'), "Verify that you can't change the type of an input element" ); var check = document.createElement("input"); var thrown = true; try { - $(check).attr('type','checkbox'); + jQuery(check).attr('type','checkbox'); } catch(e) { thrown = false; } ok( thrown, "Exception thrown when trying to change type property" ); - equals( "checkbox", $(check).attr('type'), "Verify that you can change the type of an input element that isn't in the DOM" ); + equals( "checkbox", jQuery(check).attr('type'), "Verify that you can change the type of an input element that isn't in the DOM" ); }); if ( !isLocal ) { test("attr(String, Object) - Loaded via XML document", function() { expect(2); stop(); - $.get('data/dashboard.xml', function(xml) { + jQuery.get('data/dashboard.xml', function(xml) { var titles = []; - $('tab', xml).each(function() { - titles.push($(this).attr('title')); + jQuery('tab', xml).each(function() { + titles.push(jQuery(this).attr('title')); }); equals( titles[0], 'Location', 'attr() in XML context: Check first title' ); equals( titles[1], 'Users', 'attr() in XML context: Check second title' ); @@ -479,90 +476,90 @@ if ( !isLocal ) { test("css(String|Hash)", function() { expect(19); - equals( $('#main').css("display"), 'none', 'Check for css property "display"'); - - ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible'); - $('#foo').css({display: 'none'}); - ok( !$('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden'); - $('#foo').css({display: 'block'}); - ok( $('#foo').is(':visible'), 'Modified CSS display: Assert element is visible'); - - $('#floatTest').css({styleFloat: 'right'}); - equals( $('#floatTest').css('styleFloat'), 'right', 'Modified CSS float using "styleFloat": Assert float is right'); - $('#floatTest').css({cssFloat: 'left'}); - equals( $('#floatTest').css('cssFloat'), 'left', 'Modified CSS float using "cssFloat": Assert float is left'); - $('#floatTest').css({'float': 'right'}); - equals( $('#floatTest').css('float'), 'right', 'Modified CSS float using "float": Assert float is right'); - $('#floatTest').css({'font-size': '30px'}); - equals( $('#floatTest').css('font-size'), '30px', 'Modified CSS font-size: Assert font-size is 30px'); - - $.each("0,0.25,0.5,0.75,1".split(','), function(i, n) { - $('#foo').css({opacity: n}); - equals( $('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a String" ); - $('#foo').css({opacity: parseFloat(n)}); - equals( $('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a Number" ); + equals( jQuery('#main').css("display"), 'none', 'Check for css property "display"'); + + ok( jQuery('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible'); + jQuery('#foo').css({display: 'none'}); + ok( !jQuery('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden'); + jQuery('#foo').css({display: 'block'}); + ok( jQuery('#foo').is(':visible'), 'Modified CSS display: Assert element is visible'); + + jQuery('#floatTest').css({styleFloat: 'right'}); + equals( jQuery('#floatTest').css('styleFloat'), 'right', 'Modified CSS float using "styleFloat": Assert float is right'); + jQuery('#floatTest').css({cssFloat: 'left'}); + equals( jQuery('#floatTest').css('cssFloat'), 'left', 'Modified CSS float using "cssFloat": Assert float is left'); + jQuery('#floatTest').css({'float': 'right'}); + equals( jQuery('#floatTest').css('float'), 'right', 'Modified CSS float using "float": Assert float is right'); + jQuery('#floatTest').css({'font-size': '30px'}); + equals( jQuery('#floatTest').css('font-size'), '30px', 'Modified CSS font-size: Assert font-size is 30px'); + + jQuery.each("0,0.25,0.5,0.75,1".split(','), function(i, n) { + jQuery('#foo').css({opacity: n}); + equals( jQuery('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a String" ); + jQuery('#foo').css({opacity: parseFloat(n)}); + equals( jQuery('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a Number" ); }); - $('#foo').css({opacity: ''}); - equals( $('#foo').css('opacity'), '1', "Assert opacity is 1 when set to an empty String" ); + jQuery('#foo').css({opacity: ''}); + equals( jQuery('#foo').css('opacity'), '1', "Assert opacity is 1 when set to an empty String" ); }); test("css(String, Object)", function() { expect(21); - ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible'); - $('#foo').css('display', 'none'); - ok( !$('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden'); - $('#foo').css('display', 'block'); - ok( $('#foo').is(':visible'), 'Modified CSS display: Assert element is visible'); - - $('#floatTest').css('styleFloat', 'left'); - equals( $('#floatTest').css('styleFloat'), 'left', 'Modified CSS float using "styleFloat": Assert float is left'); - $('#floatTest').css('cssFloat', 'right'); - equals( $('#floatTest').css('cssFloat'), 'right', 'Modified CSS float using "cssFloat": Assert float is right'); - $('#floatTest').css('float', 'left'); - equals( $('#floatTest').css('float'), 'left', 'Modified CSS float using "float": Assert float is left'); - $('#floatTest').css('font-size', '20px'); - equals( $('#floatTest').css('font-size'), '20px', 'Modified CSS font-size: Assert font-size is 20px'); - - $.each("0,0.25,0.5,0.75,1".split(','), function(i, n) { - $('#foo').css('opacity', n); - equals( $('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a String" ); - $('#foo').css('opacity', parseFloat(n)); - equals( $('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a Number" ); + ok( jQuery('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible'); + jQuery('#foo').css('display', 'none'); + ok( !jQuery('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden'); + jQuery('#foo').css('display', 'block'); + ok( jQuery('#foo').is(':visible'), 'Modified CSS display: Assert element is visible'); + + jQuery('#floatTest').css('styleFloat', 'left'); + equals( jQuery('#floatTest').css('styleFloat'), 'left', 'Modified CSS float using "styleFloat": Assert float is left'); + jQuery('#floatTest').css('cssFloat', 'right'); + equals( jQuery('#floatTest').css('cssFloat'), 'right', 'Modified CSS float using "cssFloat": Assert float is right'); + jQuery('#floatTest').css('float', 'left'); + equals( jQuery('#floatTest').css('float'), 'left', 'Modified CSS float using "float": Assert float is left'); + jQuery('#floatTest').css('font-size', '20px'); + equals( jQuery('#floatTest').css('font-size'), '20px', 'Modified CSS font-size: Assert font-size is 20px'); + + jQuery.each("0,0.25,0.5,0.75,1".split(','), function(i, n) { + jQuery('#foo').css('opacity', n); + equals( jQuery('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a String" ); + jQuery('#foo').css('opacity', parseFloat(n)); + equals( jQuery('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a Number" ); }); - $('#foo').css('opacity', ''); - equals( $('#foo').css('opacity'), '1', "Assert opacity is 1 when set to an empty String" ); + jQuery('#foo').css('opacity', ''); + equals( jQuery('#foo').css('opacity'), '1', "Assert opacity is 1 when set to an empty String" ); // for #1438, IE throws JS error when filter exists but doesn't have opacity in it if (jQuery.browser.msie) { - $('#foo').css("filter", "progid:DXImageTransform.Microsoft.Chroma(color='red');"); + jQuery('#foo').css("filter", "progid:DXImageTransform.Microsoft.Chroma(color='red');"); } - equals( $('#foo').css('opacity'), '1', "Assert opacity is 1 when a different filter is set in IE, #1438" ); + equals( jQuery('#foo').css('opacity'), '1', "Assert opacity is 1 when a different filter is set in IE, #1438" ); // using contents will get comments regular, text, and comment nodes - var j = $("#nonnodes").contents(); + var j = jQuery("#nonnodes").contents(); j.css("padding-left", "1px"); equals( j.css("padding-left"), "1px", "Check node,textnode,comment css works" ); // opera sometimes doesn't update 'display' correctly, see #2037 - $("#t2037")[0].innerHTML = $("#t2037")[0].innerHTML - equals( $("#t2037 .hidden").css("display"), "none", "Make sure browser thinks it is hidden" ); + jQuery("#t2037")[0].innerHTML = jQuery("#t2037")[0].innerHTML + equals( jQuery("#t2037 .hidden").css("display"), "none", "Make sure browser thinks it is hidden" ); }); test("jQuery.css(elem, 'height') doesn't clear radio buttons (bug #1095)", function () { expect(4); - var $checkedtest = $("#checkedtest"); + var $checkedtest = jQuery("#checkedtest"); // IE6 was clearing "checked" in jQuery.css(elem, "height"); jQuery.css($checkedtest[0], "height"); - ok( !! $(":radio:first", $checkedtest).attr("checked"), "Check first radio still checked." ); - ok( ! $(":radio:last", $checkedtest).attr("checked"), "Check last radio still NOT checked." ); - ok( !! $(":checkbox:first", $checkedtest).attr("checked"), "Check first checkbox still checked." ); - ok( ! $(":checkbox:last", $checkedtest).attr("checked"), "Check last checkbox still NOT checked." ); + ok( !! jQuery(":radio:first", $checkedtest).attr("checked"), "Check first radio still checked." ); + ok( ! jQuery(":radio:last", $checkedtest).attr("checked"), "Check last radio still NOT checked." ); + ok( !! jQuery(":checkbox:first", $checkedtest).attr("checked"), "Check first checkbox still checked." ); + ok( ! jQuery(":checkbox:last", $checkedtest).attr("checked"), "Check last checkbox still NOT checked." ); }); test("width()", function() { expect(9); - var $div = $("#nothiddendiv"); + var $div = jQuery("#nothiddendiv"); $div.width(30); equals($div.width(), 30, "Test set to 30 correctly"); $div.width(-1); // handle negative numbers by ignoring #1599 @@ -582,15 +579,15 @@ test("width()", function() { $div.css({ display: "", border: "", padding: "" }); - $("#nothiddendivchild").css({ padding: "3px", border: "2px solid #fff" }); - equals($("#nothiddendivchild").width(), 20, "Test child width with border and padding"); - $("#nothiddendiv, #nothiddendivchild").css({ border: "", padding: "", width: "" }); + jQuery("#nothiddendivchild").css({ padding: "3px", border: "2px solid #fff" }); + equals(jQuery("#nothiddendivchild").width(), 20, "Test child width with border and padding"); + jQuery("#nothiddendiv, #nothiddendivchild").css({ border: "", padding: "", width: "" }); }); test("height()", function() { expect(8); - var $div = $("#nothiddendiv"); + var $div = jQuery("#nothiddendiv"); $div.height(30); equals($div.height(), 30, "Test set to 30 correctly"); $div.height(-1); // handle negative numbers by ignoring #1599 @@ -614,116 +611,116 @@ test("height()", function() { test("text()", function() { expect(1); var expected = "This link has class=\"blog\": Simon Willison's Weblog"; - equals( $('#sap').text(), expected, 'Check for merged text of more then one element.' ); + equals( jQuery('#sap').text(), expected, 'Check for merged text of more then one element.' ); }); test("wrap(String|Element)", function() { expect(8); var defaultText = 'Try them out:' - var result = $('#first').wrap('
').text(); + var result = jQuery('#first').wrap('
').text(); equals( defaultText, result, 'Check for wrapping of on-the-fly html' ); - ok( $('#first').parent().parent().is('.red'), 'Check if wrapper has class "red"' ); + ok( jQuery('#first').parent().parent().is('.red'), 'Check if wrapper has class "red"' ); reset(); var defaultText = 'Try them out:' - var result = $('#first').wrap(document.getElementById('empty')).parent(); + var result = jQuery('#first').wrap(document.getElementById('empty')).parent(); ok( result.is('ol'), 'Check for element wrapping' ); equals( result.text(), defaultText, 'Check for element wrapping' ); reset(); - $('#check1').click(function() { + jQuery('#check1').click(function() { var checkbox = this; ok( checkbox.checked, "Checkbox's state is erased after wrap() action, see #769" ); - $(checkbox).wrap( '' ); + jQuery(checkbox).wrap( '' ); ok( checkbox.checked, "Checkbox's state is erased after wrap() action, see #769" ); }).click(); // using contents will get comments regular, text, and comment nodes - var j = $("#nonnodes").contents(); + var j = jQuery("#nonnodes").contents(); j.wrap(""); - equals( $("#nonnodes > i").length, 3, "Check node,textnode,comment wraps ok" ); - equals( $("#nonnodes > i").text(), j.text() + j[1].nodeValue, "Check node,textnode,comment wraps doesn't hurt text" ); + equals( jQuery("#nonnodes > i").length, 3, "Check node,textnode,comment wraps ok" ); + equals( jQuery("#nonnodes > i").text(), j.text() + j[1].nodeValue, "Check node,textnode,comment wraps doesn't hurt text" ); }); test("wrapAll(String|Element)", function() { expect(8); - var prev = $("#first")[0].previousSibling; - var p = $("#first")[0].parentNode; - var result = $('#first,#firstp').wrapAll('
'); + var prev = jQuery("#first")[0].previousSibling; + var p = jQuery("#first")[0].parentNode; + var result = jQuery('#first,#firstp').wrapAll('
'); equals( result.parent().length, 1, 'Check for wrapping of on-the-fly html' ); - ok( $('#first').parent().parent().is('.red'), 'Check if wrapper has class "red"' ); - ok( $('#firstp').parent().parent().is('.red'), 'Check if wrapper has class "red"' ); - equals( $("#first").parent().parent()[0].previousSibling, prev, "Correct Previous Sibling" ); - equals( $("#first").parent().parent()[0].parentNode, p, "Correct Parent" ); + ok( jQuery('#first').parent().parent().is('.red'), 'Check if wrapper has class "red"' ); + ok( jQuery('#firstp').parent().parent().is('.red'), 'Check if wrapper has class "red"' ); + equals( jQuery("#first").parent().parent()[0].previousSibling, prev, "Correct Previous Sibling" ); + equals( jQuery("#first").parent().parent()[0].parentNode, p, "Correct Parent" ); reset(); - var prev = $("#first")[0].previousSibling; - var p = $("#first")[0].parentNode; - var result = $('#first,#firstp').wrapAll(document.getElementById('empty')); - equals( $("#first").parent()[0], $("#firstp").parent()[0], "Same Parent" ); - equals( $("#first").parent()[0].previousSibling, prev, "Correct Previous Sibling" ); - equals( $("#first").parent()[0].parentNode, p, "Correct Parent" ); + var prev = jQuery("#first")[0].previousSibling; + var p = jQuery("#first")[0].parentNode; + var result = jQuery('#first,#firstp').wrapAll(document.getElementById('empty')); + equals( jQuery("#first").parent()[0], jQuery("#firstp").parent()[0], "Same Parent" ); + equals( jQuery("#first").parent()[0].previousSibling, prev, "Correct Previous Sibling" ); + equals( jQuery("#first").parent()[0].parentNode, p, "Correct Parent" ); }); test("wrapInner(String|Element)", function() { expect(6); - var num = $("#first").children().length; - var result = $('#first').wrapInner('
'); - equals( $("#first").children().length, 1, "Only one child" ); - ok( $("#first").children().is(".red"), "Verify Right Element" ); - equals( $("#first").children().children().children().length, num, "Verify Elements Intact" ); + var num = jQuery("#first").children().length; + var result = jQuery('#first').wrapInner('
'); + equals( jQuery("#first").children().length, 1, "Only one child" ); + ok( jQuery("#first").children().is(".red"), "Verify Right Element" ); + equals( jQuery("#first").children().children().children().length, num, "Verify Elements Intact" ); reset(); - var num = $("#first").children().length; - var result = $('#first').wrapInner(document.getElementById('empty')); - equals( $("#first").children().length, 1, "Only one child" ); - ok( $("#first").children().is("#empty"), "Verify Right Element" ); - equals( $("#first").children().children().length, num, "Verify Elements Intact" ); + var num = jQuery("#first").children().length; + var result = jQuery('#first').wrapInner(document.getElementById('empty')); + equals( jQuery("#first").children().length, 1, "Only one child" ); + ok( jQuery("#first").children().is("#empty"), "Verify Right Element" ); + equals( jQuery("#first").children().children().length, num, "Verify Elements Intact" ); }); test("append(String|Element|Array<Element>|jQuery)", function() { expect(21); var defaultText = 'Try them out:' - var result = $('#first').append('buga'); + var result = jQuery('#first').append('buga'); equals( result.text(), defaultText + 'buga', 'Check if text appending works' ); - equals( $('#select3').append('').find('option:last-child').attr('value'), 'appendTest', 'Appending html options to select element'); + equals( jQuery('#select3').append('').find('option:last-child').attr('value'), 'appendTest', 'Appending html options to select element'); reset(); var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:"; - $('#sap').append(document.getElementById('first')); - equals( expected, $('#sap').text(), "Check for appending of element" ); + jQuery('#sap').append(document.getElementById('first')); + equals( expected, jQuery('#sap').text(), "Check for appending of element" ); reset(); expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo"; - $('#sap').append([document.getElementById('first'), document.getElementById('yahoo')]); - equals( expected, $('#sap').text(), "Check for appending of array of elements" ); + jQuery('#sap').append([document.getElementById('first'), document.getElementById('yahoo')]); + equals( expected, jQuery('#sap').text(), "Check for appending of array of elements" ); reset(); expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo"; - $('#sap').append($("#first, #yahoo")); - equals( expected, $('#sap').text(), "Check for appending of jQuery object" ); + jQuery('#sap').append(jQuery("#first, #yahoo")); + equals( expected, jQuery('#sap').text(), "Check for appending of jQuery object" ); reset(); - $("#sap").append( 5 ); - ok( $("#sap")[0].innerHTML.match( /5$/ ), "Check for appending a number" ); + jQuery("#sap").append( 5 ); + ok( jQuery("#sap")[0].innerHTML.match( /5$/ ), "Check for appending a number" ); reset(); - $("#sap").append( " text with spaces " ); - ok( $("#sap")[0].innerHTML.match(/ text with spaces $/), "Check for appending text with spaces" ); + jQuery("#sap").append( " text with spaces " ); + ok( jQuery("#sap")[0].innerHTML.match(/ text with spaces $/), "Check for appending text with spaces" ); reset(); - ok( $("#sap").append([]), "Check for appending an empty array." ); - ok( $("#sap").append(""), "Check for appending an empty string." ); - ok( $("#sap").append(document.getElementsByTagName("foo")), "Check for appending an empty nodelist." ); + ok( jQuery("#sap").append([]), "Check for appending an empty array." ); + ok( jQuery("#sap").append(""), "Check for appending an empty string." ); + ok( jQuery("#sap").append(document.getElementsByTagName("foo")), "Check for appending an empty nodelist." ); reset(); - $("#sap").append(document.getElementById('form')); - equals( $("#sap>form").size(), 1, "Check for appending a form" ); // Bug #910 + jQuery("#sap").append(document.getElementById('form')); + equals( jQuery("#sap>form").size(), 1, "Check for appending a form" ); // Bug #910 reset(); var pass = true; try { - $( $("#iframe")[0].contentWindow.document.body ).append("
test
"); + jQuery( jQuery("#iframe")[0].contentWindow.document.body ).append("
test
"); } catch(e) { pass = false; } @@ -731,115 +728,115 @@ test("append(String|Element|Array<Element>|jQuery)", function() { ok( pass, "Test for appending a DOM node to the contents of an IFrame" ); reset(); - $('
').appendTo('#form').append('test'); + jQuery('
').appendTo('#form').append('test'); t( 'Append legend', '#legend', ['legend'] ); reset(); - $('#select1').append(''); - equals( $('#select1 option:last').text(), "Test", "Appending <OPTION> (all caps)" ); + jQuery('#select1').append(''); + equals( jQuery('#select1 option:last').text(), "Test", "Appending <OPTION> (all caps)" ); - $('#table').append(''); - ok( $('#table colgroup').length, "Append colgroup" ); + jQuery('#table').append(''); + ok( jQuery('#table colgroup').length, "Append colgroup" ); - $('#table colgroup').append(''); - ok( $('#table colgroup col').length, "Append col" ); + jQuery('#table colgroup').append(''); + ok( jQuery('#table colgroup col').length, "Append col" ); reset(); - $('#table').append(''); - ok( $('#table caption').length, "Append caption" ); + jQuery('#table').append(''); + ok( jQuery('#table caption').length, "Append caption" ); reset(); - $('form:last') + jQuery('form:last') .append('') .append(''); t( "Append Select", "#appendSelect1, #appendSelect2", ["appendSelect1", "appendSelect2"] ); // using contents will get comments regular, text, and comment nodes - var j = $("#nonnodes").contents(); - var d = $("
").appendTo("#nonnodes").append(j); - equals( $("#nonnodes").length, 1, "Check node,textnode,comment append moved leaving just the div" ); + var j = jQuery("#nonnodes").contents(); + var d = jQuery("
").appendTo("#nonnodes").append(j); + equals( jQuery("#nonnodes").length, 1, "Check node,textnode,comment append moved leaving just the div" ); ok( d.contents().length >= 2, "Check node,textnode,comment append works" ); d.contents().appendTo("#nonnodes"); d.remove(); - ok( $("#nonnodes").contents().length >= 2, "Check node,textnode,comment append cleanup worked" ); + ok( jQuery("#nonnodes").contents().length >= 2, "Check node,textnode,comment append cleanup worked" ); }); test("appendTo(String|Element|Array<Element>|jQuery)", function() { expect(6); var defaultText = 'Try them out:' - $('buga').appendTo('#first'); - equals( $("#first").text(), defaultText + 'buga', 'Check if text appending works' ); - equals( $('').appendTo('#select3').parent().find('option:last-child').attr('value'), 'appendTest', 'Appending html options to select element'); + jQuery('buga').appendTo('#first'); + equals( jQuery("#first").text(), defaultText + 'buga', 'Check if text appending works' ); + equals( jQuery('').appendTo('#select3').parent().find('option:last-child').attr('value'), 'appendTest', 'Appending html options to select element'); reset(); var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:"; - $(document.getElementById('first')).appendTo('#sap'); - equals( expected, $('#sap').text(), "Check for appending of element" ); + jQuery(document.getElementById('first')).appendTo('#sap'); + equals( expected, jQuery('#sap').text(), "Check for appending of element" ); reset(); expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo"; - $([document.getElementById('first'), document.getElementById('yahoo')]).appendTo('#sap'); - equals( expected, $('#sap').text(), "Check for appending of array of elements" ); + jQuery([document.getElementById('first'), document.getElementById('yahoo')]).appendTo('#sap'); + equals( expected, jQuery('#sap').text(), "Check for appending of array of elements" ); reset(); expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo"; - $("#first, #yahoo").appendTo('#sap'); - equals( expected, $('#sap').text(), "Check for appending of jQuery object" ); + jQuery("#first, #yahoo").appendTo('#sap'); + equals( expected, jQuery('#sap').text(), "Check for appending of jQuery object" ); reset(); - $('#select1').appendTo('#foo'); + jQuery('#select1').appendTo('#foo'); t( 'Append select', '#foo select', ['select1'] ); }); test("prepend(String|Element|Array<Element>|jQuery)", function() { expect(5); var defaultText = 'Try them out:' - var result = $('#first').prepend('buga'); + var result = jQuery('#first').prepend('buga'); equals( result.text(), 'buga' + defaultText, 'Check if text prepending works' ); - equals( $('#select3').prepend('').find('option:first-child').attr('value'), 'prependTest', 'Prepending html options to select element'); + equals( jQuery('#select3').prepend('').find('option:first-child').attr('value'), 'prependTest', 'Prepending html options to select element'); reset(); var expected = "Try them out:This link has class=\"blog\": Simon Willison's Weblog"; - $('#sap').prepend(document.getElementById('first')); - equals( expected, $('#sap').text(), "Check for prepending of element" ); + jQuery('#sap').prepend(document.getElementById('first')); + equals( expected, jQuery('#sap').text(), "Check for prepending of element" ); reset(); expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog"; - $('#sap').prepend([document.getElementById('first'), document.getElementById('yahoo')]); - equals( expected, $('#sap').text(), "Check for prepending of array of elements" ); + jQuery('#sap').prepend([document.getElementById('first'), document.getElementById('yahoo')]); + equals( expected, jQuery('#sap').text(), "Check for prepending of array of elements" ); reset(); expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog"; - $('#sap').prepend($("#first, #yahoo")); - equals( expected, $('#sap').text(), "Check for prepending of jQuery object" ); + jQuery('#sap').prepend(jQuery("#first, #yahoo")); + equals( expected, jQuery('#sap').text(), "Check for prepending of jQuery object" ); }); test("prependTo(String|Element|Array<Element>|jQuery)", function() { expect(6); var defaultText = 'Try them out:' - $('buga').prependTo('#first'); - equals( $('#first').text(), 'buga' + defaultText, 'Check if text prepending works' ); - equals( $('').prependTo('#select3').parent().find('option:first-child').attr('value'), 'prependTest', 'Prepending html options to select element'); + jQuery('buga').prependTo('#first'); + equals( jQuery('#first').text(), 'buga' + defaultText, 'Check if text prepending works' ); + equals( jQuery('').prependTo('#select3').parent().find('option:first-child').attr('value'), 'prependTest', 'Prepending html options to select element'); reset(); var expected = "Try them out:This link has class=\"blog\": Simon Willison's Weblog"; - $(document.getElementById('first')).prependTo('#sap'); - equals( expected, $('#sap').text(), "Check for prepending of element" ); + jQuery(document.getElementById('first')).prependTo('#sap'); + equals( expected, jQuery('#sap').text(), "Check for prepending of element" ); reset(); expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog"; - $([document.getElementById('yahoo'), document.getElementById('first')]).prependTo('#sap'); - equals( expected, $('#sap').text(), "Check for prepending of array of elements" ); + jQuery([document.getElementById('yahoo'), document.getElementById('first')]).prependTo('#sap'); + equals( expected, jQuery('#sap').text(), "Check for prepending of array of elements" ); reset(); expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog"; - $("#yahoo, #first").prependTo('#sap'); - equals( expected, $('#sap').text(), "Check for prepending of jQuery object" ); + jQuery("#yahoo, #first").prependTo('#sap'); + equals( expected, jQuery('#sap').text(), "Check for prepending of jQuery object" ); reset(); - $('').prependTo('form:last'); - $('').prependTo('form:last'); + jQuery('').prependTo('form:last'); + jQuery('').prependTo('form:last'); t( "Prepend Select", "#prependSelect1, #prependSelect2", ["prependSelect1", "prependSelect2"] ); }); @@ -847,164 +844,164 @@ test("prependTo(String|Element|Array<Element>|jQuery)", function() { test("before(String|Element|Array<Element>|jQuery)", function() { expect(4); var expected = 'This is a normal link: bugaYahoo'; - $('#yahoo').before('buga'); - equals( expected, $('#en').text(), 'Insert String before' ); + jQuery('#yahoo').before('buga'); + equals( expected, jQuery('#en').text(), 'Insert String before' ); reset(); expected = "This is a normal link: Try them out:Yahoo"; - $('#yahoo').before(document.getElementById('first')); - equals( expected, $('#en').text(), "Insert element before" ); + jQuery('#yahoo').before(document.getElementById('first')); + equals( expected, jQuery('#en').text(), "Insert element before" ); reset(); expected = "This is a normal link: Try them out:diveintomarkYahoo"; - $('#yahoo').before([document.getElementById('first'), document.getElementById('mark')]); - equals( expected, $('#en').text(), "Insert array of elements before" ); + jQuery('#yahoo').before([document.getElementById('first'), document.getElementById('mark')]); + equals( expected, jQuery('#en').text(), "Insert array of elements before" ); reset(); expected = "This is a normal link: Try them out:diveintomarkYahoo"; - $('#yahoo').before($("#first, #mark")); - equals( expected, $('#en').text(), "Insert jQuery before" ); + jQuery('#yahoo').before(jQuery("#first, #mark")); + equals( expected, jQuery('#en').text(), "Insert jQuery before" ); }); test("insertBefore(String|Element|Array<Element>|jQuery)", function() { expect(4); var expected = 'This is a normal link: bugaYahoo'; - $('buga').insertBefore('#yahoo'); - equals( expected, $('#en').text(), 'Insert String before' ); + jQuery('buga').insertBefore('#yahoo'); + equals( expected, jQuery('#en').text(), 'Insert String before' ); reset(); expected = "This is a normal link: Try them out:Yahoo"; - $(document.getElementById('first')).insertBefore('#yahoo'); - equals( expected, $('#en').text(), "Insert element before" ); + jQuery(document.getElementById('first')).insertBefore('#yahoo'); + equals( expected, jQuery('#en').text(), "Insert element before" ); reset(); expected = "This is a normal link: Try them out:diveintomarkYahoo"; - $([document.getElementById('first'), document.getElementById('mark')]).insertBefore('#yahoo'); - equals( expected, $('#en').text(), "Insert array of elements before" ); + jQuery([document.getElementById('first'), document.getElementById('mark')]).insertBefore('#yahoo'); + equals( expected, jQuery('#en').text(), "Insert array of elements before" ); reset(); expected = "This is a normal link: Try them out:diveintomarkYahoo"; - $("#first, #mark").insertBefore('#yahoo'); - equals( expected, $('#en').text(), "Insert jQuery before" ); + jQuery("#first, #mark").insertBefore('#yahoo'); + equals( expected, jQuery('#en').text(), "Insert jQuery before" ); }); test("after(String|Element|Array<Element>|jQuery)", function() { expect(4); var expected = 'This is a normal link: Yahoobuga'; - $('#yahoo').after('buga'); - equals( expected, $('#en').text(), 'Insert String after' ); + jQuery('#yahoo').after('buga'); + equals( expected, jQuery('#en').text(), 'Insert String after' ); reset(); expected = "This is a normal link: YahooTry them out:"; - $('#yahoo').after(document.getElementById('first')); - equals( expected, $('#en').text(), "Insert element after" ); + jQuery('#yahoo').after(document.getElementById('first')); + equals( expected, jQuery('#en').text(), "Insert element after" ); reset(); expected = "This is a normal link: YahooTry them out:diveintomark"; - $('#yahoo').after([document.getElementById('first'), document.getElementById('mark')]); - equals( expected, $('#en').text(), "Insert array of elements after" ); + jQuery('#yahoo').after([document.getElementById('first'), document.getElementById('mark')]); + equals( expected, jQuery('#en').text(), "Insert array of elements after" ); reset(); expected = "This is a normal link: YahooTry them out:diveintomark"; - $('#yahoo').after($("#first, #mark")); - equals( expected, $('#en').text(), "Insert jQuery after" ); + jQuery('#yahoo').after(jQuery("#first, #mark")); + equals( expected, jQuery('#en').text(), "Insert jQuery after" ); }); test("insertAfter(String|Element|Array<Element>|jQuery)", function() { expect(4); var expected = 'This is a normal link: Yahoobuga'; - $('buga').insertAfter('#yahoo'); - equals( expected, $('#en').text(), 'Insert String after' ); + jQuery('buga').insertAfter('#yahoo'); + equals( expected, jQuery('#en').text(), 'Insert String after' ); reset(); expected = "This is a normal link: YahooTry them out:"; - $(document.getElementById('first')).insertAfter('#yahoo'); - equals( expected, $('#en').text(), "Insert element after" ); + jQuery(document.getElementById('first')).insertAfter('#yahoo'); + equals( expected, jQuery('#en').text(), "Insert element after" ); reset(); expected = "This is a normal link: YahooTry them out:diveintomark"; - $([document.getElementById('mark'), document.getElementById('first')]).insertAfter('#yahoo'); - equals( expected, $('#en').text(), "Insert array of elements after" ); + jQuery([document.getElementById('mark'), document.getElementById('first')]).insertAfter('#yahoo'); + equals( expected, jQuery('#en').text(), "Insert array of elements after" ); reset(); expected = "This is a normal link: YahooTry them out:diveintomark"; - $("#mark, #first").insertAfter('#yahoo'); - equals( expected, $('#en').text(), "Insert jQuery after" ); + jQuery("#mark, #first").insertAfter('#yahoo'); + equals( expected, jQuery('#en').text(), "Insert jQuery after" ); }); test("replaceWith(String|Element|Array<Element>|jQuery)", function() { expect(10); - $('#yahoo').replaceWith('buga'); - ok( $("#replace")[0], 'Replace element with string' ); - ok( !$("#yahoo")[0], 'Verify that original element is gone, after string' ); + jQuery('#yahoo').replaceWith('buga'); + ok( jQuery("#replace")[0], 'Replace element with string' ); + ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after string' ); reset(); - $('#yahoo').replaceWith(document.getElementById('first')); - ok( $("#first")[0], 'Replace element with element' ); - ok( !$("#yahoo")[0], 'Verify that original element is gone, after element' ); + jQuery('#yahoo').replaceWith(document.getElementById('first')); + ok( jQuery("#first")[0], 'Replace element with element' ); + ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after element' ); reset(); - $('#yahoo').replaceWith([document.getElementById('first'), document.getElementById('mark')]); - ok( $("#first")[0], 'Replace element with array of elements' ); - ok( $("#mark")[0], 'Replace element with array of elements' ); - ok( !$("#yahoo")[0], 'Verify that original element is gone, after array of elements' ); + jQuery('#yahoo').replaceWith([document.getElementById('first'), document.getElementById('mark')]); + ok( jQuery("#first")[0], 'Replace element with array of elements' ); + ok( jQuery("#mark")[0], 'Replace element with array of elements' ); + ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after array of elements' ); reset(); - $('#yahoo').replaceWith($("#first, #mark")); - ok( $("#first")[0], 'Replace element with set of elements' ); - ok( $("#mark")[0], 'Replace element with set of elements' ); - ok( !$("#yahoo")[0], 'Verify that original element is gone, after set of elements' ); + jQuery('#yahoo').replaceWith(jQuery("#first, #mark")); + ok( jQuery("#first")[0], 'Replace element with set of elements' ); + ok( jQuery("#mark")[0], 'Replace element with set of elements' ); + ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after set of elements' ); }); test("replaceAll(String|Element|Array<Element>|jQuery)", function() { expect(10); - $('buga').replaceAll("#yahoo"); - ok( $("#replace")[0], 'Replace element with string' ); - ok( !$("#yahoo")[0], 'Verify that original element is gone, after string' ); + jQuery('buga').replaceAll("#yahoo"); + ok( jQuery("#replace")[0], 'Replace element with string' ); + ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after string' ); reset(); - $(document.getElementById('first')).replaceAll("#yahoo"); - ok( $("#first")[0], 'Replace element with element' ); - ok( !$("#yahoo")[0], 'Verify that original element is gone, after element' ); + jQuery(document.getElementById('first')).replaceAll("#yahoo"); + ok( jQuery("#first")[0], 'Replace element with element' ); + ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after element' ); reset(); - $([document.getElementById('first'), document.getElementById('mark')]).replaceAll("#yahoo"); - ok( $("#first")[0], 'Replace element with array of elements' ); - ok( $("#mark")[0], 'Replace element with array of elements' ); - ok( !$("#yahoo")[0], 'Verify that original element is gone, after array of elements' ); + jQuery([document.getElementById('first'), document.getElementById('mark')]).replaceAll("#yahoo"); + ok( jQuery("#first")[0], 'Replace element with array of elements' ); + ok( jQuery("#mark")[0], 'Replace element with array of elements' ); + ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after array of elements' ); reset(); - $("#first, #mark").replaceAll("#yahoo"); - ok( $("#first")[0], 'Replace element with set of elements' ); - ok( $("#mark")[0], 'Replace element with set of elements' ); - ok( !$("#yahoo")[0], 'Verify that original element is gone, after set of elements' ); + jQuery("#first, #mark").replaceAll("#yahoo"); + ok( jQuery("#first")[0], 'Replace element with set of elements' ); + ok( jQuery("#mark")[0], 'Replace element with set of elements' ); + ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after set of elements' ); }); test("end()", function() { expect(3); - equals( 'Yahoo', $('#yahoo').parent().end().text(), 'Check for end' ); - ok( $('#yahoo').end(), 'Check for end with nothing to end' ); + equals( 'Yahoo', jQuery('#yahoo').parent().end().text(), 'Check for end' ); + ok( jQuery('#yahoo').end(), 'Check for end with nothing to end' ); - var x = $('#yahoo'); + var x = jQuery('#yahoo'); x.parent(); - equals( 'Yahoo', $('#yahoo').text(), 'Check for non-destructive behaviour' ); + equals( 'Yahoo', jQuery('#yahoo').text(), 'Check for non-destructive behaviour' ); }); test("find(String)", function() { expect(2); - equals( 'Yahoo', $('#foo').find('.blogTest').text(), 'Check for find' ); + equals( 'Yahoo', jQuery('#foo').find('.blogTest').text(), 'Check for find' ); // using contents will get comments regular, text, and comment nodes - var j = $("#nonnodes").contents(); + var j = jQuery("#nonnodes").contents(); equals( j.find("div").length, 0, "Check node,textnode,comment to find zero divs" ); }); test("clone()", function() { expect(20); - equals( 'This is a normal link: Yahoo', $('#en').text(), 'Assert text for #en' ); - var clone = $('#yahoo').clone(); - equals( 'Try them out:Yahoo', $('#first').append(clone).text(), 'Check for clone' ); - equals( 'This is a normal link: Yahoo', $('#en').text(), 'Reassert text for #en' ); + equals( 'This is a normal link: Yahoo', jQuery('#en').text(), 'Assert text for #en' ); + var clone = jQuery('#yahoo').clone(); + equals( 'Try them out:Yahoo', jQuery('#first').append(clone).text(), 'Check for clone' ); + equals( 'This is a normal link: Yahoo', jQuery('#en').text(), 'Reassert text for #en' ); var cloneTags = [ "", "", "", "", "", "
", "
", @@ -1013,12 +1010,12 @@ test("clone()", function() { "