| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1027 人关注过本帖
标题:谁能解这段javascript代码?
只看楼主 加入收藏
wanution
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-4-2
收藏
 问题点数:0 回复次数:4 
谁能解这段javascript代码?
程序代码:
/*

 * jQuery 1.1.2 - New Wave Javascript

 *

 * Copyright (c) 2007 John Resig ()

 * Dual licensed under the MIT (MIT-LICENSE.txt)

 * and GPL (GPL-LICENSE.txt) licenses.

 *

 * $Date: 2007-02-27 17:18:47 -0500 (Tue, 27 Feb 2007) $

 * $Rev: 1460 $

 */

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('7(1D 1u.6=="R"){1u.R=1u.R;v 6=q(a,c){7(1u==l)u 1q 6(a,c);a=a||12;7(6.1p(a))u 1q 6(12)[6.D.27?"27":"2P"](a);7(1D a=="20"){v m=/^[^<]*(<(.|\\s)+>)[^>]*$/.2M(a);7(m)a=6.41([m[1]]);I u 1q 6(c).2p(a)}u l.6p(a.1l==2A&&a||(a.3W||a.H&&a!=1u&&!a.1W&&a[0]!=R&&a[0].1W)&&6.3N(a)||[a])};7(1D $!="R")6.30$=$;v $=6;6.D=6.8n={3W:"1.1.2",8K:q(){u l.H},H:0,2b:q(1P){u 1P==R?6.3N(l):l[1P]},2j:q(a){v K=6(a);K.6n=l;u K},6p:q(a){l.H=0;[].1m.15(l,a);u l},J:q(D,1A){u 6.J(l,D,1A)},2g:q(1b){v 4W=-1;l.J(q(i){7(l==1b)4W=i});u 4W},1G:q(23,O,B){v 1b=23;7(23.1l==3t)7(O==R)u l.H&&6[B||"1G"](l[0],23)||R;I{1b={};1b[23]=O}u l.J(q(2g){P(v G 1B 1b)6.1G(B?l.1o:l,G,6.G(l,1b[G],B,2g,G))})},1n:q(23,O){u l.1G(23,O,"3g")},2I:q(e){7(1D e=="20")u l.3u().3s(12.8q(e));v t="";6.J(e||l,q(){6.J(l.3b,q(){7(l.1W!=8)t+=l.1W!=1?l.6u:6.D.2I([l])})});u t},2H:q(){v a=6.41(1v);u l.J(q(){v b=a[0].3j(U);l.Y.2T(b,l);1Y(b.1a)b=b.1a;b.4A(l)})},3s:q(){u l.3d(1v,U,1,q(a){l.4A(a)})},5j:q(){u l.3d(1v,U,-1,q(a){l.2T(a,l.1a)})},5k:q(){u l.3d(1v,11,1,q(a){l.Y.2T(a,l)})},5u:q(){u l.3d(1v,11,-1,q(a){l.Y.2T(a,l.2c)})},4f:q(){u l.6n||6([])},2p:q(t){u l.2j(6.2Y(l,q(a){u 6.2p(t,a)}),t)},4Y:q(4M){u l.2j(6.2Y(l,q(a){v a=a.3j(4M!=R?4M:U);a.$1E=14;u a}))},1C:q(t){u l.2j(6.1p(t)&&6.2n(l,q(2u,2g){u t.15(2u,[2g])})||6.3z(t,l))},2e:q(t){u l.2j(t.1l==3t&&6.3z(t,l,U)||6.2n(l,q(a){u(t.1l==2A||t.3W)?6.3y(a,t)<0:a!=t}))},1K:q(t){u l.2j(6.2m(l.2b(),t.1l==3t?6(t).2b():t.H!=R&&(!t.1e||t.1e=="8s")?t:[t]))},4k:q(1s){u 1s?6.1C(1s,l).r.H>0:11},19:q(19){u 19==R?(l.H?l[0].O:14):l.1G("O",19)},4T:q(19){u 19==R?(l.H?l[0].2G:14):l.3u().3s(19)},3d:q(1A,1N,3Y,D){v 4Y=l.H>1;v a=6.41(1A);7(3Y<0)a.8t();u l.J(q(){v 1b=l;7(1N&&6.1e(l,"1N")&&6.1e(a[0],"3m"))1b=l.5K("1X")[0]||l.4A(12.56("1X"));6.J(a,q(){D.15(1b,[4Y?l.3j(U):l])})})}};6.1w=6.D.1w=q(){v 1T=1v[0],a=1;7(1v.H==1){1T=l;a=0}v G;1Y(G=1v[a++])P(v i 1B G)1T[i]=G[i];u 1T};6.1w({8u:q(){7(6.30$)$=6.30$;u 6},1p:q(D){u!!D&&1D D!="20"&&!D.1e&&1D D[0]=="R"&&/q/i.1j(D+"")},4C:q(C){u C.60&&C.5J&&!C.5J.63},1e:q(C,W){u C.1e&&C.1e.3K()==W.3K()},J:q(1b,D,1A){7(1b.H==R)P(v i 1B 1b)D.15(1b[i],1A||[i,1b[i]]);I P(v i=0,6q=1b.H;i<6q;i++)7(D.15(1b[i],1A||[i,1b[i]])===11)3M;u 1b},G:q(C,O,B,2g,G){7(6.1p(O))O=O.3n(C,[2g]);v 5G=/z-?2g|8x-?8y|1c|58|8z-?26/i;u O&&O.1l==3J&&B=="3g"&&!5G.1j(G)?O+"4R":O},18:{1K:q(C,c){6.J(c.3o(/\\s+/),q(i,N){7(!6.18.2Q(C.18,N))C.18+=(C.18?" ":"")+N})},2d:q(C,c){C.18=c?6.2n(C.18.3o(/\\s+/),q(N){u!6.18.2Q(c,N)}).6r(" "):""},2Q:q(t,c){t=t.18||t;c=c.1S(/([\\.\\\\\\+\\*\\?\\[\\^\\]\\$\\(\\)\\{\\}\\=\\!\\<\\>\\|\\:])/g,"\\\\$1");u t&&1q 4u("(^|\\\\s)"+c+"(\\\\s|$)").1j(t)}},4c:q(e,o,f){P(v i 1B o){e.1o["1L"+i]=e.1o[i];e.1o[i]=o[i]}f.15(e,[]);P(v i 1B o)e.1o[i]=e.1o["1L"+i]},1n:q(e,p){7(p=="26"||p=="3Q"){v 1L={},44,3I,d=["8A","8B","8C","8D"];6.J(d,q(){1L["8E"+l]=0;1L["8F"+l+"8G"]=0});6.4c(e,1L,q(){7(6.1n(e,"1h")!="1V"){44=e.8H;3I=e.8I}I{e=6(e.3j(U)).2p(":4i").5m("2W").4f().1n({4m:"1F",3k:"7H",1h:"2z",8L:"0",6w:"0"}).5A(e.Y)[0];v 3i=6.1n(e.Y,"3k");7(3i==""||3i=="4a")e.Y.1o.3k="6x";44=e.6y;3I=e.6z;7(3i==""||3i=="4a")e.Y.1o.3k="4a";e.Y.36(e)}});u p=="26"?44:3I}u 6.3g(e,p)},3g:q(C,G,53){v K;7(G=="1c"&&6.V.1g)u 6.1G(C.1o,"1c");7(G=="4g"||G=="2s")G=6.V.1g?"3X":"2s";7(!53&&C.1o[G])K=C.1o[G];I 7(12.42&&12.42.4V){7(G=="2s"||G=="3X")G="4g";G=G.1S(/([A-Z])/g,"-$1").4l();v N=12.42.4V(C,14);7(N)K=N.54(G);I 7(G=="1h")K="1V";I 6.4c(C,{1h:"2z"},q(){v c=12.42.4V(l,"");K=c&&c.54(G)||""})}I 7(C.4e){v 55=G.1S(/\\-(\\w)/g,q(m,c){u c.3K()});K=C.4e[G]||C.4e[55]}u K},41:q(a){v r=[];6.J(a,q(i,1z){7(!1z)u;7(1z.1l==3J)1z=1z.6C();7(1D 1z=="20"){v s=6.32(1z),22=12.56("22"),2h=[];v 2H=!s.17("<1t")&&[1,"<40>","</40>"]||(!s.17("<6D")||!s.17("<1X")||!s.17("<6E"))&&[1,"<1N>","</1N>"]||!s.17("<3m")&&[2,"<1N><1X>","</1X></1N>"]||(!s.17("<6F")||!s.17("<6G"))&&[3,"<1N><1X><3m>","</3m></1X></1N>"]||[0,"",""];22.2G=2H[1]+s+2H[2];1Y(2H[0]--)22=22.1a;7(6.V.1g){7(!s.17("<1N")&&s.17("<1X")<0)2h=22.1a&&22.1a.3b;I 7(2H[1]=="<1N>"&&s.17("<1X")<0)2h=22.3b;P(v n=2h.H-1;n>=0;--n)7(6.1e(2h[n],"1X")&&!2h[n].3b.H)2h[n].Y.36(2h[n])}1z=22.3b}7(1z.H===0&&!6.1e(1z,"3w"))u;7(1z[0]==R||6.1e(1z,"3w"))r.1m(1z);I r=6.2m(r,1z)});u r},1G:q(C,W,O){v 2l=6.4C(C)?{}:{"P":"6J","6L":"18","4g":6.V.1g?"3X":"2s",2s:6.V.1g?"3X":"2s",2G:"2G",18:"18",O:"O",2U:"2U",2W:"2W",88:"6N",2R:"2R"};7(W=="1c"&&6.V.1g&&O!=R){C.58=1;u C.1C=C.1C.1S(/4h\\([^\\)]*\\)/6O,"")+(O==1?"":"4h(1c="+O*6c+")")}I 7(W=="1c"&&6.V.1g)u C.1C?4S(C.1C.6P(/4h\\(1c=(.*)\\)/)[1])/6c:1;7(W=="1c"&&6.V.3h&&O==1)O=0.6R;7(2l[W]){7(O!=R)C[2l[W]]=O;u C[2l[W]]}I 7(O==R&&6.V.1g&&6.1e(C,"3w")&&(W=="80"||W=="7Z"))u C.6T(W).6u;I 7(C.60){7(O!=R)C.6V(W,O);7(6.V.1g&&/5E|3f/.1j(W)&&!6.4C(C))u C.33(W,2);u C.33(W)}I{W=W.1S(/-([a-z])/6W,q(z,b){u b.3K()});7(O!=R)C[W]=O;u C[W]}},32:q(t){u t.1S(/^\\s+|\\s+$/g,"")},3N:q(a){v r=[];7(a.1l!=2A)P(v i=0,2L=a.H;i<2L;i++)r.1m(a[i]);I r=a.3O(0);u r},3y:q(b,a){P(v i=0,2L=a.H;i<2L;i++)7(a[i]==b)u i;u-1},2m:q(2r,3P){v r=[].3O.3n(2r,0);P(v i=0,5c=3P.H;i<5c;i++)7(6.3y(3P[i],r)==-1)2r.1m(3P[i]);u 2r},2n:q(1O,D,4j){7(1D D=="20")D=1q 4v("a","i","u "+D);v 1f=[];P(v i=0,2u=1O.H;i<2u;i++)7(!4j&&D(1O[i],i)||4j&&!D(1O[i],i))1f.1m(1O[i]);u 1f},2Y:q(1O,D){7(1D D=="20")D=1q 4v("a","u "+D);v 1f=[],r=[];P(v i=0,2u=1O.H;i<2u;i++){v 19=D(1O[i],i);7(19!==14&&19!=R){7(19.1l!=2A)19=[19];1f=1f.6Z(19)}}v r=1f.H?[1f[0]]:[];5g:P(v i=1,5f=1f.H;i<5f;i++){P(v j=0;j<i;j++)7(1f[i]==r[j])5F 5g;r.1m(1f[i])}u r}});1q q(){v b=7K.71.4l();6.V={2F:/5D/.1j(b),3e:/3e/.1j(b),1g:/1g/.1j(b)&&!/3e/.1j(b),3h:/3h/.1j(b)&&!/(72|5D)/.1j(b)};6.7G=!6.V.1g||12.74=="75"};6.J({5v:"a.Y",4y:"6.4y(a)",76:"6.29(a,2,\'2c\')",7C:"6.29(a,2,\'5t\')",78:"6.2w(a.Y.1a,a)",79:"6.2w(a.1a)"},q(i,n){6.D[i]=q(a){v K=6.2Y(l,n);7(a&&1D a=="20")K=6.3z(a,K);u l.2j(K)}});6.J({5A:"3s",7b:"5j",2T:"5k",7d:"5u"},q(i,n){6.D[i]=q(){v a=1v;u l.J(q(){P(v j=0,2L=a.H;j<2L;j++)6(a[j])[n](l)})}});6.J({5m:q(23){6.1G(l,23,"");l.7f(23)},7g:q(c){6.18.1K(l,c)},7h:q(c){6.18.2d(l,c)},7j:q(c){6.18[6.18.2Q(l,c)?"2d":"1K"](l,c)},2d:q(a){7(!a||6.1C(a,[l]).r.H)l.Y.36(l)},3u:q(){1Y(l.1a)l.36(l.1a)}},q(i,n){6.D[i]=q(){u l.J(n,1v)}});6.J(["5r","5o","5q","5w"],q(i,n){6.D[n]=q(1P,D){u l.1C(":"+n+"("+1P+")",D)}});6.J(["26","3Q"],q(i,n){6.D[n]=q(h){u h==R?(l.H?6.1n(l[0],n):14):l.1n(n,h.1l==3t?h:h+"4R")}});6.1w({1s:{"":"m[2]==\'*\'||6.1e(a,m[2])","#":"a.33(\'2D\')==m[2]",":":{5o:"i<m[3]-0",5q:"i>m[3]-0",29:"m[3]-0==i",5r:"m[3]-0==i",2r:"i==0",2X:"i==r.H-1",5S:"i%2==0",5T:"i%2","29-3r":"6.29(a.Y.1a,m[3],\'2c\',a)==a","2r-3r":"6.29(a.Y.1a,1,\'2c\')==a","2X-3r":"6.29(a.Y.7m,1,\'5t\')==a","7o-3r":"6.2w(a.Y.1a).H==1",5v:"a.1a",3u:"!a.1a",5w:"6.D.2I.15([a]).17(m[3])>=0",38:\'a.B!="1F"&&6.1n(a,"1h")!="1V"&&6.1n(a,"4m")!="1F"\',1F:\'a.B=="1F"||6.1n(a,"1h")=="1V"||6.1n(a,"4m")=="1F"\',7u:"!a.2U",2U:"a.2U",2W:"a.2W",2R:"a.2R||6.1G(a,\'2R\')",2I:"a.B==\'2I\'",4i:"a.B==\'4i\'",5y:"a.B==\'5y\'",4F:"a.B==\'4F\'",5z:"a.B==\'5z\'",4Q:"a.B==\'4Q\'",5a:"a.B==\'5a\'",5B:"a.B==\'5B\'",3x:\'a.B=="3x"||6.1e(a,"3x")\',5C:"/5C|40|7z|3x/i.1j(a.1e)"},".":"6.18.2Q(a,m[2])","@":{"=":"z==m[4]","!=":"z!=m[4]","^=":"z&&!z.17(m[4])","$=":"z&&z.2S(z.H - m[4].H,m[4].H)==m[4]","*=":"z&&z.17(m[4])>=0","":"z",4t:q(m){u["",m[1],m[3],m[2],m[5]]},5Q:"z=a[m[3]];7(!z||/5E|3f/.1j(m[3]))z=6.1G(a,m[3]);"},"[":"6.2p(m[2],a).H"},5N:[/^\\[ *(@)([a-2o-3C-]*) *([!*$^=]*) *(\'?"?)(.*?)\\4 *\\]/i,/^(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]/,/^(:)([a-2o-3C-]*)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/i,/^([:.#]*)([a-2o-3C*-]*)/i],1R:[/^(\\/?\\.\\.)/,"a.Y",/^(>|\\/)/,"6.2w(a.1a)",/^(\\+)/,"6.29(a,2,\'2c\')",/^(~)/,q(a){v s=6.2w(a.Y.1a);u s.3O(6.3y(a,s)+1)}],3z:q(1s,1O,2e){v 1L,N=[];1Y(1s&&1s!=1L){1L=1s;v f=6.1C(1s,1O,2e);1s=f.t.1S(/^\\s*,\\s*/,"");N=2e?1O=f.r:6.2m(N,f.r)}u N},2p:q(t,1y){7(1D t!="20")u[t];7(1y&&!1y.1W)1y=14;1y=1y||12;7(!t.17("//")){1y=1y.4G;t=t.2S(2,t.H)}I 7(!t.17("/")){1y=1y.4G;t=t.2S(1,t.H);7(t.17("/")>=1)t=t.2S(t.17("/"),t.H)}v K=[1y],2a=[],2X=14;1Y(t&&2X!=t){v r=[];2X=t;t=6.32(t).1S(/^\\/\\//i,"");v 3B=11;v 1H=/^[\\/>]\\s*([a-2o-9*-]+)/i;v m=1H.2M(t);7(m){6.J(K,q(){P(v c=l.1a;c;c=c.2c)7(c.1W==1&&(6.1e(c,m[1])||m[1]=="*"))r.1m(c)});K=r;t=t.1S(1H,"");7(t.17(" ")==0)5F;3B=U}I{P(v i=0;i<6.1R.H;i+=2){v 1H=6.1R[i];v m=1H.2M(t);7(m){r=K=6.2Y(K,6.1p(6.1R[i+1])?6.1R[i+1]:q(a){u 3l(6.1R[i+1])});t=6.32(t.1S(1H,""));3B=U;3M}}}7(t&&!3B){7(!t.17(",")){7(K[0]==1y)K.4K();6.2m(2a,K);r=K=[1y];t=" "+t.2S(1,t.H)}I{v 31=/^([a-2o-3C-]+)(#)([a-2o-9\\\\*30-]*)/i;v m=31.2M(t);7(m){m=[0,m[2],m[3],m[1]]}I{31=/^([#.]?)([a-2o-9\\\\*30-]*)/i;m=31.2M(t)}7(m[1]=="#"&&K[K.H-1].4X){v 2i=K[K.H-1].4X(m[2]);7(6.V.1g&&2i&&2i.2D!=m[2])2i=6(\'[@2D="\'+m[2]+\'"]\',K[K.H-1])[0];K=r=2i&&(!m[3]||6.1e(2i,m[3]))?[2i]:[]}I{7(m[1]==".")v 4q=1q 4u("(^|\\\\s)"+m[2]+"(\\\\s|$)");6.J(K,q(){v 3E=m[1]!=""||m[0]==""?"*":m[2];7(6.1e(l,"7I")&&3E=="*")3E="3c";6.2m(r,m[1]!=""&&K.H!=1?6.4w(l,[],m[1],m[2],4q):l.5K(3E))});7(m[1]=="."&&K.H==1)r=6.2n(r,q(e){u 4q.1j(e.18)});7(m[1]=="#"&&K.H==1){v 5L=r;r=[];6.J(5L,q(){7(l.33("2D")==m[2]){r=[l];u 11}})}K=r}t=t.1S(31,"")}}7(t){v 19=6.1C(t,r);K=r=19.r;t=6.32(19.t)}}7(K&&K[0]==1y)K.4K();6.2m(2a,K);u 2a},1C:q(t,r,2e){1Y(t&&/^[a-z[({<*:.#]/i.1j(t)){v p=6.5N,m;6.J(p,q(i,1H){m=1H.2M(t);7(m){t=t.7L(m[0].H);7(6.1s[m[1]].4t)m=6.1s[m[1]].4t(m);u 11}});7(m[1]==":"&&m[2]=="2e")r=6.1C(m[3],r,U).r;I 7(m[1]=="."){v 1H=1q 4u("(^|\\\\s)"+m[2]+"(\\\\s|$)");r=6.2n(r,q(e){u 1H.1j(e.18||"")},2e)}I{v f=6.1s[m[1]];7(1D f!="20")f=6.1s[m[1]][m[2]];3l("f = q(a,i){"+(6.1s[m[1]].5Q||"")+"u "+f+"}");r=6.2n(r,f,2e)}}u{r:r,t:t}},4w:q(o,r,1R,W,1H){P(v s=o.1a;s;s=s.2c)7(s.1W==1){v 1K=U;7(1R==".")1K=s.18&&1H.1j(s.18);I 7(1R=="#")1K=s.33("2D")==W;7(1K)r.1m(s);7(1R=="#"&&r.H)3M;7(s.1a)6.4w(s,r,1R,W,1H)}u r},4y:q(C){v 4z=[];v N=C.Y;1Y(N&&N!=12){4z.1m(N);N=N.Y}u 4z},29:q(N,1f,3Y,C){1f=1f||1;v 1P=0;P(;N;N=N[3Y]){7(N.1W==1)1P++;7(1P==1f||1f=="5S"&&1P%2==0&&1P>1&&N==C||1f=="5T"&&1P%2==1&&N==C)u N}},2w:q(n,C){v r=[];P(;n;n=n.2c){7(n.1W==1&&(!C||n!=C))r.1m(n)}u r}});6.F={1K:q(S,B,1k,E){7(6.V.1g&&S.45!=R)S=1u;7(E)1k.E=E;7(!1k.2y)1k.2y=l.2y++;7(!S.$1E)S.$1E={};v 34=S.$1E[B];7(!34){34=S.$1E[B]={};7(S["35"+B])34[0]=S["35"+B]}34[1k.2y]=1k;S["35"+B]=l.5Y;7(!l.1i[B])l.1i[B]=[];l.1i[B].1m(S)},2y:1,1i:{},2d:q(S,B,1k){7(S.$1E){v i,j,k;7(B&&B.B){1k=B.1k;B=B.B}7(B&&S.$1E[B])7(1k)5V S.$1E[B][1k.2y];I P(i 1B S.$1E[B])5V S.$1E[B][i];I P(j 1B S.$1E)l.2d(S,j);P(k 1B S.$1E[B])7(k){k=U;3M}7(!k)S["35"+B]=14}},1Q:q(B,E,S){E=6.3N(E||[]);7(!S)6.J(l.1i[B]||[],q(){6.F.1Q(B,E,l)});I{v 1k=S["35"+B],19,D=6.1p(S[B]);7(1k){E.61(l.2l({B:B,1T:S}));7((19=1k.15(S,E))!==11)l.4E=U}7(D&&19!==11)S[B]();l.4E=11}},5Y:q(F){7(1D 6=="R"||6.F.4E)u;F=6.F.2l(F||1u.F||{});v 3R;v c=l.$1E[F.B];v 1A=[].3O.3n(1v,1);1A.61(F);P(v j 1B c){1A[0].1k=c[j];1A[0].E=c[j].E;7(c[j].15(l,1A)===11){F.2q();F.2E();3R=11}}7(6.V.1g)F.1T=F.2q=F.2E=F.1k=F.E=14;u 3R},2l:q(F){7(!F.1T&&F.62)F.1T=F.62;7(F.64==R&&F.66!=R){v e=12.4G,b=12.63;F.64=F.66+(e.67||b.67);F.7W=F.7X+(e.6b||b.6b)}7(6.V.2F&&F.1T.1W==3){v 2V=F;F=6.1w({},2V);F.1T=2V.1T.Y;F.2q=q(){u 2V.2q()};F.2E=q(){u 2V.2E()}}7(!F.2q)F.2q=q(){l.3R=11};7(!F.2E)F.2E=q(){l.7Y=U};u F}};6.D.1w({3T:q(B,E,D){u l.J(q(){6.F.1K(l,B,D||E,E)})},6s:q(B,E,D){u l.J(q(){6.F.1K(l,B,q(F){6(l).6f(F);u(D||E).15(l,1v)},E)})},6f:q(B,D){u l.J(q(){6.F.2d(l,B,D)})},1Q:q(B,E){u l.J(q(){6.F.1Q(B,E,l)})},3V:q(){v a=1v;u l.6i(q(e){l.4L=l.4L==0?1:0;e.2q();u a[l.4L].15(l,[e])||11})},81:q(f,g){q 4N(e){v p=(e.B=="3Z"?e.82:e.83)||e.84;1Y(p&&p!=l)2B{p=p.Y}2J(e){p=l};7(p==l)u 11;u(e.B=="3Z"?f:g).15(l,[e])}u l.3Z(4N).6j(4N)},27:q(f){7(6.3U)f.15(12,[6]);I{6.3a.1m(q(){u f.15(l,[6])})}u l}});6.1w({3U:11,3a:[],27:q(){7(!6.3U){6.3U=U;7(6.3a){6.J(6.3a,q(){l.15(12)});6.3a=14}7(6.V.3h||6.V.3e)12.85("6m",6.27,11)}}});1q q(){6.J(("86,87,2P,89,8b,51,6i,8c,"+"8d,8e,8f,3Z,6j,8h,40,"+"4Q,8i,8j,8k,2x").3o(","),q(i,o){6.D[o]=q(f){u f?l.3T(o,f):l.1Q(o)}});7(6.V.3h||6.V.3e)12.8l("6m",6.27,11);I 7(6.V.1g){12.8m("<8o"+"8p 2D=6o 8r=U "+"3f=//:><\\/2f>");v 2f=12.4X("6o");7(2f)2f.37=q(){7(l.3D!="1Z")u;l.Y.36(l);6.27()};2f=14}I 7(6.V.2F)6.4Z=45(q(){7(12.3D=="8v"||12.3D=="1Z"){4o(6.4Z);6.4Z=14;6.27()}},10);6.F.1K(1u,"2P",6.27)};7(6.V.1g)6(1u).6s("51",q(){v 1i=6.F.1i;P(v B 1B 1i){v 49=1i[B],i=49.H;7(i&&B!=\'51\')6v 6.F.2d(49[i-1],B);1Y(--i)}});6.D.1w({6A:q(T,21,L){l.2P(T,21,L,1)},2P:q(T,21,L,1U){7(6.1p(T))u l.3T("2P",T);L=L||q(){};v B="5e";7(21)7(6.1p(21)){L=21;21=14}I{21=6.3c(21);B="65"}v 4d=l;6.3v({T:T,B:B,E:21,1U:1U,1Z:q(2K,16){7(16=="2O"||!1U&&16=="5M")4d.1G("2G",2K.3G).4U().J(L,[2K.3G,16,2K]);I L.15(4d,[2K.3G,16,2K])}});u l},6B:q(){u 6.3c(l)},4U:q(){u l.2p("2f").J(q(){7(l.3f)6.59(l.3f);I 6.50(l.2I||l.6H||l.2G||"")}).4f()}});7(!1u.3p)3p=q(){u 1q 6I("6K.6M")};6.J("5n,5R,5P,5W,5O,5I".3o(","),q(i,o){6.D[o]=q(f){u l.3T(o,f)}});6.1w({2b:q(T,E,L,B,1U){7(6.1p(E)){L=E;E=14}u 6.3v({T:T,E:E,2O:L,4s:B,1U:1U})},6Q:q(T,E,L,B){u 6.2b(T,E,L,B,1)},59:q(T,L){u 6.2b(T,14,L,"2f")},6S:q(T,E,L){u 6.2b(T,E,L,"6l")},6U:q(T,E,L,B){7(6.1p(E)){L=E;E={}}u 6.3v({B:"65",T:T,E:E,2O:L,4s:B})},6X:q(28){6.3q.28=28},6Y:q(5d){6.1w(6.3q,5d)},3q:{1i:U,B:"5e",28:0,5s:"70/x-73-3w-77",5i:U,48:U,E:14},3S:{},3v:q(s){s=6.1w({},6.3q,s);7(s.E){7(s.5i&&1D s.E!="20")s.E=6.3c(s.E);7(s.B.4l()=="2b"){s.T+=((s.T.17("?")>-1)?"&":"?")+s.E;s.E=14}}7(s.1i&&!6.4D++)6.F.1Q("5n");v 4x=11;v M=1q 3p();M.7i(s.B,s.T,s.48);7(s.E)M.3A("7k-7l",s.5s);7(s.1U)M.3A("7n-4J-7p",6.3S[s.T]||"7r, 7s 7v 7w 4n:4n:4n 7y");M.3A("X-7A-7B","3p");7(M.7D)M.3A("7E","7F");7(s.5H)s.5H(M);7(s.1i)6.F.1Q("5I",[M,s]);v 37=q(4r){7(M&&(M.3D==4||4r=="28")){4x=U;7(3H){4o(3H);3H=14}v 16;2B{16=6.5Z(M)&&4r!="28"?s.1U&&6.68(M,s.T)?"5M":"2O":"2x";7(16!="2x"){v 3F;2B{3F=M.4O("6a-4J")}2J(e){}7(s.1U&&3F)6.3S[s.T]=3F;v E=6.6h(M,s.4s);7(s.2O)s.2O(E,16);7(s.1i)6.F.1Q("5O",[M,s])}I 6.3L(s,M,16)}2J(e){16="2x";6.3L(s,M,16,e)}7(s.1i)6.F.1Q("5P",[M,s]);7(s.1i&&!--6.4D)6.F.1Q("5R");7(s.1Z)s.1Z(M,16);7(s.48)M=14}};v 3H=45(37,13);7(s.28>0)57(q(){7(M){M.7M();7(!4x)37("28")}},s.28);2B{M.7O(s.E)}2J(e){6.3L(s,M,14,e)}7(!s.48)37();u M},3L:q(s,M,16,e){7(s.2x)s.2x(M,16,e);7(s.1i)6.F.1Q("5W",[M,s,e])},4D:0,5Z:q(r){2B{u!r.16&&7T.7U=="4F:"||(r.16>=5X&&r.16<7V)||r.16==6d||6.V.2F&&r.16==R}2J(e){}u 11},68:q(M,T){2B{v 6e=M.4O("6a-4J");u M.16==6d||6e==6.3S[T]||6.V.2F&&M.16==R}2J(e){}u 11},6h:q(r,B){v 4P=r.4O("8a-B");v E=!B&&4P&&4P.17("M")>=0;E=B=="M"||E?r.8g:r.3G;7(B=="2f")6.50(E);7(B=="6l")3l("E = "+E);7(B=="4T")6("<22>").4T(E).4U();u E},3c:q(a){v s=[];7(a.1l==2A||a.3W)6.J(a,q(){s.1m(2N(l.W)+"="+2N(l.O))});I P(v j 1B a)7(a[j]&&a[j].1l==2A)6.J(a[j],q(){s.1m(2N(j)+"="+2N(l))});I s.1m(2N(j)+"="+2N(a[j]));u s.6r("&")},50:q(E){7(1u.52)1u.52(E);I 7(6.V.2F)1u.57(E,0);I 3l.3n(1u,E)}});6.D.1w({1M:q(Q,L){v 1F=l.1C(":1F");Q?1F.25({26:"1M",3Q:"1M",1c:"1M"},Q,L):1F.J(q(){l.1o.1h=l.2C?l.2C:"";7(6.1n(l,"1h")=="1V")l.1o.1h="2z"});u l},1I:q(Q,L){v 38=l.1C(":38");Q?38.25({26:"1I",3Q:"1I",1c:"1I"},Q,L):38.J(q(){l.2C=l.2C||6.1n(l,"1h");7(l.2C=="1V")l.2C="2z";l.1o.1h="1V"});u l},5h:6.D.3V,3V:q(D,4H){v 1A=1v;u 6.1p(D)&&6.1p(4H)?l.5h(D,4H):l.J(q(){6(l)[6(l).4k(":1F")?"1M":"1I"].15(6(l),1A)})},7a:q(Q,L){u l.25({26:"1M"},Q,L)},7c:q(Q,L){u l.25({26:"1I"},Q,L)},7e:q(Q,L){u l.J(q(){v 5l=6(l).4k(":1F")?"1M":"1I";6(l).25({26:5l},Q,L)})},7q:q(Q,L){u l.25({1c:"1M"},Q,L)},7t:q(Q,L){u l.25({1c:"1I"},Q,L)},7x:q(Q,43,L){u l.25({1c:43},Q,L)},25:q(G,Q,1r,L){u l.1J(q(){l.2t=6.1w({},G);v 1t=6.Q(Q,1r,L);P(v p 1B G){v e=1q 6.39(l,1t,p);7(G[p].1l==3J)e.2v(e.N(),G[p]);I e[G[p]](G)}})},1J:q(B,D){7(!D){D=B;B="39"}u l.J(q(){7(!l.1J)l.1J={};7(!l.1J[B])l.1J[B]=[];l.1J[B].1m(D);7(l.1J[B].H==1)D.15(l)})}});6.1w({Q:q(Q,1r,D){v 1t=Q&&Q.1l==7J?Q:{1Z:D||!D&&1r||6.1p(Q)&&Q,24:Q,1r:D&&1r||1r&&1r.1l!=4v&&1r};1t.24=(1t.24&&1t.24.1l==3J?1t.24:{7P:7Q,7R:5X}[1t.24])||7S;1t.1L=1t.1Z;1t.1Z=q(){6.69(l,"39");7(6.1p(1t.1L))1t.1L.15(l)};u 1t},1r:{},1J:{},69:q(C,B){B=B||"39";7(C.1J&&C.1J[B]){C.1J[B].4K();v f=C.1J[B][0];7(f)f.15(C)}},39:q(C,1d,G){v z=l;v y=C.1o;v 4B=6.1n(C,"1h");y.5U="1F";z.a=q(){7(1d.47)1d.47.15(C,[z.2k]);7(G=="1c")6.1G(y,"1c",z.2k);I 7(6k(z.2k))y[G]=6k(z.2k)+"4R";y.1h="2z"};z.6t=q(){u 4S(6.1n(C,G))};z.N=q(){v r=4S(6.3g(C,G));u r&&r>-8w?r:z.6t()};z.2v=q(4b,43){z.4I=(1q 5p()).5x();z.2k=4b;z.a();z.4p=45(q(){z.47(4b,43)},13)};z.1M=q(){7(!C.1x)C.1x={};C.1x[G]=l.N();1d.1M=U;z.2v(0,C.1x[G]);7(G!="1c")y[G]="5b"};z.1I=q(){7(!C.1x)C.1x={};C.1x[G]=l.N();1d.1I=U;z.2v(C.1x[G],0)};z.3V=q(){7(!C.1x)C.1x={};C.1x[G]=l.N();7(4B=="1V"){1d.1M=U;7(G!="1c")y[G]="5b";z.2v(0,C.1x[G])}I{1d.1I=U;z.2v(C.1x[G],0)}};z.47=q(2Z,46){v t=(1q 5p()).5x();7(t>1d.24+z.4I){4o(z.4p);z.4p=14;z.2k=46;z.a();7(C.2t)C.2t[G]=U;v 2a=U;P(v i 1B C.2t)7(C.2t[i]!==U)2a=11;7(2a){y.5U="";y.1h=4B;7(6.1n(C,"1h")=="1V")y.1h="2z";7(1d.1I)y.1h="1V";7(1d.1I||1d.1M)P(v p 1B C.2t)7(p=="1c")6.1G(y,p,C.1x[p]);I y[p]=""}7(2a&&6.1p(1d.1Z))1d.1Z.15(C)}I{v n=t-l.4I;v p=n/1d.24;z.2k=1d.1r&&6.1r[1d.1r]?6.1r[1d.1r](p,n,2Z,(46-2Z),1d.24):((-6g.7N(p*6g.8J)/2)+0.5)*(46-2Z)+2Z;z.a()}}}})}',62,544,'||||||jQuery|if||||||||||||||this|||||function||||return|var||||||type|elem|fn|data|event|prop|length|else|each|ret|callback|xml|cur|value|for|speed|undefined|element|url|true|browser|name||parentNode|||false|document||null|apply|status|indexOf|className|val|firstChild|obj|opacity|options|nodeName|result|msie|display|global|test|handler|constructor|push|css|style|isFunction|new|easing|expr|opt|window|arguments|extend|orig|context|arg|args|in|filter|typeof|events|hidden|attr|re|hide|queue|add|old|show|table|elems|num|trigger|token|replace|target|ifModified|none|nodeType|tbody|while|complete|string|params|div|key|duration|animate|height|ready|timeout|nth|done|get|nextSibling|remove|not|script|index|tb|oid|pushStack|now|fix|merge|grep|z0|find|preventDefault|first|cssFloat|curAnim|el|custom|sibling|error|guid|block|Array|try|oldblock|id|stopPropagation|safari|innerHTML|wrap|text|catch|res|al|exec|encodeURIComponent|success|load|has|selected|substr|insertBefore|disabled|originalEvent|checked|last|map|firstNum|_|re2|trim|getAttribute|handlers|on|removeChild|onreadystatechange|visible|fx|readyList|childNodes|param|domManip|opera|src|curCSS|mozilla|parPos|cloneNode|position|eval|tr|call|split|XMLHttpRequest|ajaxSettings|child|append|String|empty|ajax|form|button|inArray|multiFilter|setRequestHeader|foundToken|9_|readyState|tag|modRes|responseText|ival|oWidth|Number|toUpperCase|handleError|break|makeArray|slice|second|width|returnValue|lastModified|bind|isReady|toggle|jquery|styleFloat|dir|mouseover|select|clean|defaultView|to|oHeight|setInterval|lastNum|step|async|els|static|from|swap|self|currentStyle|end|float|alpha|radio|inv|is|toLowerCase|visibility|00|clearInterval|timer|rec|isTimeout|dataType|_resort|RegExp|Function|getAll|requestDone|parents|matched|appendChild|oldDisplay|isXMLDoc|active|triggered|file|documentElement|fn2|startTime|Modified|shift|lastToggle|deep|handleHover|getResponseHeader|ct|submit|px|parseFloat|html|evalScripts|getComputedStyle|pos|getElementById|clone|safariTimer|globalEval|unload|execScript|force|getPropertyValue|newProp|createElement|setTimeout|zoom|getScript|image|1px|sl|settings|GET|rl|check|_toggle|processData|prepend|before|state|removeAttr|ajaxStart|lt|Date|gt|eq|contentType|previousSibling|after|parent|contains|getTime|checkbox|password|appendTo|reset|input|webkit|href|continue|exclude|beforeSend|ajaxSend|ownerDocument|getElementsByTagName|tmp|notmodified|parse|ajaxSuccess|ajaxComplete|_prefix|ajaxStop|even|odd|overflow|delete|ajaxError|200|handle|httpSuccess|tagName|unshift|srcElement|body|pageX|POST|clientX|scrollLeft|httpNotModified|dequeue|Last|scrollTop|100|304|xmlRes|unbind|Math|httpData|click|mouseout|parseInt|json|DOMContentLoaded|prevObject|__ie_init|setArray|ol|join|one|max|nodeValue|do|left|relative|clientHeight|clientWidth|loadIfModified|serialize|toString|thead|tfoot|td|th|textContent|ActiveXObject|htmlFor|Microsoft|class|XMLHTTP|readOnly|gi|match|getIfModified|9999|getJSON|getAttributeNode|post|setAttribute|ig|ajaxTimeout|ajaxSetup|concat|application|userAgent|compatible|www|compatMode|CSS1Compat|next|urlencoded|siblings|children|slideDown|prependTo|slideUp|insertAfter|slideToggle|removeAttribute|addClass|removeClass|open|toggleClass|Content|Type|lastChild|If|only|Since|fadeIn|Thu|01|fadeOut|enabled|Jan|1970|fadeTo|GMT|textarea|Requested|With|prev|overrideMimeType|Connection|close|boxModel|absolute|object|Object|navigator|substring|abort|cos|send|slow|600|fast|400|location|protocol|300|pageY|clientY|cancelBubble|method|action|hover|fromElement|toElement|relatedTarget|removeEventListener|blur|focus|readonly|resize|content|scroll|dblclick|mousedown|mouseup|mousemove|responseXML|change|keydown|keypress|keyup|addEventListener|write|prototype|scr|ipt|createTextNode|defer|FORM|reverse|noConflict|loaded|10000|font|weight|line|Top|Bottom|Right|Left|padding|border|Width|offsetHeight|offsetWidth|PI|size|right'.split('|'),0,{}))
搜索更多相关主题的帖子: javascript 代码 
2008-08-21 13:56
FFEEDD
Rank: 1
等 级:新手上路
帖 子:640
专家分:0
注 册:2007-11-16
收藏
得分:0 
程序代码:
/* prevent execution of jQuery if included more than once */
if(typeof window.jQuery == "undefined") {
/*

 * jQuery 1.1.2 - New Wave Javascript

 *

 * Copyright (c) 2007 John Resig ()

 * Dual licensed under the MIT (MIT-LICENSE.txt)

 * and GPL (GPL-LICENSE.txt) licenses.

 *

 * $Date: 2007-02-28 12:03:00 -0500 (Wed, 28 Feb 2007) $

 * $Rev: 1465 $

 */

// Global undefined variable
window.undefined = window.undefined;

/**

 * Create a new jQuery Object

 *

 * @constructor

 * @private

 * @name jQuery

 * @param String|Function|Element|Array<Element>|jQuery a selector

 * @param jQuery|Element|Array<Element> c context

 * @cat Core

 */
var jQuery = function(a,c) {
    // If the context is global, return a new object
    if ( window == this )
        return new jQuery(a,c);

    // Make sure that a selection was provided
    a = a || document;
    
    // HANDLE: $(function)
    // Shortcut for document ready
    if ( jQuery.isFunction(a) )
        return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( a );
    
    // Handle HTML strings
    if ( typeof a  == "string" ) {
        // HANDLE: $(html) -> $(array)
        var m = /^[^<]*(<(.|\s)+>)[^>]*$/.exec(a);
        if ( m )
            a = jQuery.clean( [ m[1] ] );
        
        // HANDLE: $(expr)
        else
            return new jQuery( c ).find( a );
    }
    
    return this.setArray(
        // HANDLE: $(array)
        a.constructor == Array && a ||

        // HANDLE: $(arraylike)
        // Watch for when an array-like object is passed as the selector
        (a.jquery || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType) && jQuery.makeArray( a ) ||

        // HANDLE: $(*)
        [ a ] );
};

// Map over the $ in case of overwrite
if ( typeof $ != "undefined" )
    jQuery._$ = $;
    
// Map the jQuery namespace to the '$' one
var $ = jQuery;

/**

 * This function accepts a string containing a CSS or

 * basic XPath selector which is then used to match a set of elements.

 *

 * The core functionality of jQuery centers around this function.

 * Everything in jQuery is based upon this, or uses this in some way.

 * The most basic use of this function is to pass in an expression

 * (usually consisting of CSS or XPath), which then finds all matching

 * elements.

 *

 * By default, if no context is specified, $() looks for DOM elements within the context of the

 * current HTML document. If you do specify a context, such as a DOM

 * element or jQuery object, the expression will be matched against

 * the contents of that context.

 *

 * See [[DOM/Traversing/Selectors]] for the allowed CSS/XPath syntax for expressions.

 *

 * @example $("div > p")

 * @desc Finds all p elements that are children of a div element.

 * @before <p>one</p> <div><p>two</p></div> <p>three</p>

 * @result [ <p>two</p> ]

 *

 * @example $("input:radio", document.forms[0])

 * @desc Searches for all inputs of type radio within the first form in the document

 *

 * @example $("div", xml.responseXML)

 * @desc This finds all div elements within the specified XML document.

 *

 * @name $

 * @param String expr An expression to search with

 * @param Element|jQuery context (optional) A DOM Element, Document or jQuery to use as context

 * @cat Core

 * @type jQuery

 * @see $(Element)

 * @see $(Element<Array>)

 */

 
/**

 * Create DOM elements on-the-fly from the provided String of raw HTML.

 *

 * @example $("<div><p>Hello</p></div>").appendTo("body")

 * @desc Creates a div element (and all of its contents) dynamically, 

 * and appends it to the body element. Internally, an

 * element is created and its innerHTML property set to the given markup.

 * It is therefore both quite flexible and limited. 

 *

 * @name $

 * @param String html A string of HTML to create on the fly.

 * @cat Core

 * @type jQuery

 * @see appendTo(String)

 */

/**

 * Wrap jQuery functionality around a single or multiple DOM Element(s).

 *

 * This function also accepts XML Documents and Window objects

 * as valid arguments (even though they are not DOM Elements).

 *

 * @example $(document.body).css( "background", "black" );

 * @desc Sets the background color of the page to black.

 *

 * @example $( myForm.elements ).hide()

 * @desc Hides all the input elements within a form

 *

 * @name $

 * @param Element|Array<Element> elems DOM element(s) to be encapsulated by a jQuery object.

 * @cat Core

 * @type jQuery

 */

/**

 * A shorthand for $(document).ready(), allowing you to bind a function

 * to be executed when the DOM document has finished loading. This function

 * behaves just like $(document).ready(), in that it should be used to wrap

 * other $() operations on your page that depend on the DOM being ready to be

 * operated on. While this function is, technically, chainable - there really

 * isn't much use for chaining against it.

 *

 * You can have as many $(document).ready events on your page as you like.

 *

 * See ready(Function) for details about the ready event. 

 * 

 * @example $(function(){

 *   // Document is ready

 * });

 * @desc Executes the function when the DOM is ready to be used.

 *

 * @example jQuery(function($) {

 *   // Your code using failsafe $ alias here...

 * });

 * @desc Uses both the shortcut for $(document).ready() and the argument

 * to write failsafe jQuery code using the $ alias, without relying on the

 * global alias.

 *

 * @name $

 * @param Function fn The function to execute when the DOM is ready.

 * @cat Core

 * @type jQuery

 * @see ready(Function)

 */

jQuery.fn = jQuery.prototype = {
    /**
     * The current version of jQuery.
     *
     * @private
     * @property
     * @name jquery
     * @type String
     * @cat Core
     */
    jquery: "1.1.2",

    /**
     * The number of elements currently matched. The size function will return the same value.
     *
     * @example $("img").length;
     * @before <img src="test1.jpg"/> <img src="test2.jpg"/>
     * @result 2
     *
     * @property
     * @name length
     * @type Number
     * @cat Core
     */

    /**
     * Get the number of elements currently matched. This returns the same
     * number as the 'length' property of the jQuery object.
     *
     * @example $("img").size();
     * @before <img src="test1.jpg"/> <img src="test2.jpg"/>
     * @result 2
     *
     * @name size
     * @type Number
     * @cat Core
     */
    size: function() {
        return this.length;
    },
    
    length: 0,

    /**
     * Access all matched DOM elements. This serves as a backwards-compatible
     * way of accessing all matched elements (other than the jQuery object
     * itself, which is, in fact, an array of elements).
     *
     * It is useful if you need to operate on the DOM elements themselves instead of using built-in jQuery functions.
     *
     * @example $("img").get();
     * @before <img src="test1.jpg"/> <img src="test2.jpg"/>
     * @result [ <img src="test1.jpg"/> <img src="test2.jpg"/> ]
     * @desc Selects all images in the document and returns the DOM Elements as an Array
     *
     * @name get
     * @type Array<Element>
     * @cat Core
     */

    /**
     * Access a single matched DOM element at a specified index in the matched set.
     * This allows you to extract the actual DOM element and operate on it
     * directly without necessarily using jQuery functionality on it.
     *
     * @example $("img").get(0);
     * @before <img src="test1.jpg"/> <img src="test2.jpg"/>
     * @result <img src="test1.jpg"/>
     * @desc Selects all images in the document and returns the first one
     *
     * @name get
     * @type Element
     * @param Number num Access the element in the Nth position.
     * @cat Core
     */
    get: function( num ) {
        return num == undefined ?

            // Return a 'clean' array
            jQuery.makeArray( this ) :

            // Return just the object
            this[num];
    },
    
    /**
     * Set the jQuery object to an array of elements, while maintaining
     * the stack.
     *
     * @example $("img").pushStack([ document.body ]);
     * @result $("img").pushStack() == [ document.body ]
     *
     * @private
     * @name pushStack
     * @type jQuery
     * @param Elements elems An array of elements
     * @cat Core
     */
    pushStack: function( a ) {
        var ret = jQuery(a);
        ret.prevObject = this;
        return ret;
    },
    
    /**
     * Set the jQuery object to an array of elements. This operation is
     * completely destructive - be sure to use .pushStack() if you wish to maintain
     * the jQuery stack.
     *
     * @example $("img").setArray([ document.body ]);
     * @result $("img").setArray() == [ document.body ]
     *
     * @private
     * @name setArray
     * @type jQuery
     * @param Elements elems An array of elements
     * @cat Core
     */
    setArray: function( a ) {
        this.length = 0;
        [].push.apply( this, a );
        return this;
    },

    /**
     * Execute a function within the context of every matched element.
     * This means that every time the passed-in function is executed
     * (which is once for every element matched) the 'this' keyword
     * points to the specific DOM element.
     *
     * Additionally, the function, when executed, is passed a single
     * argument representing the position of the element in the matched
     * set (integer, zero-index).
     *
     * @example $("img").each(function(i){
     *   this.src = "test" + i + ".jpg";
     * });
     * @before <img/><img/>
     * @result <img src="test0.jpg"/><img src="test1.jpg"/>
     * @desc Iterates over two images and sets their src property
     *
     * @name each
     * @type jQuery
     * @param Function fn A function to execute
     * @cat Core
     */
    each: function( fn, args ) {
        return jQuery.each( this, fn, args );
    },

    /**
     * Searches every matched element for the object and returns
     * the index of the element, if found, starting with zero. 
     * Returns -1 if the object wasn't found.
     *
     * @example $("*").index( $('#foobar')[0] ) 
     * @before <div id="foobar"><b></b><span id="foo"></span></div>
     * @result 0
     * @desc Returns the index for the element with ID foobar
     *
     * @example $("*").index( $('#foo')[0] ) 
     * @before <div id="foobar"><b></b><span id="foo"></span></div>
     * @result 2
     * @desc Returns the index for the element with ID foo within another element
     *
     * @example $("*").index( $('#bar')[0] ) 
     * @before <div id="foobar"><b></b><span id="foo"></span></div>
     * @result -1
     * @desc Returns -1, as there is no element with ID bar
     *
     * @name index
     * @type Number
     * @param Element subject Object to search for
     * @cat Core
     */
    index: function( obj ) {
        var pos = -1;
        this.each(function(i){
            if ( this == obj ) pos = i;
        });
        return pos;
    },

    /**
     * Access a property on the first matched element.
     * This method makes it easy to retrieve a property value
     * from the first matched element.
     *
     * If the element does not have an attribute with such a

      * name, undefined is returned.
     *
     * @example $("img").attr("src");
     * @before <img src="test.jpg"/>
     * @result test.jpg
     * @desc Returns the src attribute from the first image in the document.
     *
     * @name attr
     * @type Object
     * @param String name The name of the property to access.
     * @cat DOM/Attributes
     */

    /**
     * Set a key/value object as properties to all matched elements.
     *
     * This serves as the best way to set a large number of properties
     * on all matched elements.
     *
     * @example $("img").attr({ src: "test.jpg", alt: "Test Image" });
     * @before <img/>
     * @result <img src="test.jpg" alt="Test Image"/>
     * @desc Sets src and alt attributes to all images.
     *
     * @name attr
     * @type jQuery
     * @param Map properties Key/value pairs to set as object properties.
     * @cat DOM/Attributes
     */

    /**
     * Set a single property to a value, on all matched elements.
     *
     * Note that you can't set the name property of input elements in IE.
     * Use $(html) or .append(html) or .html(html) to create elements
     * on the fly including the name property.
     *
     * @example $("img").attr("src","test.jpg");
     * @before <img/>
     * @result <img src="test.jpg"/>
     * @desc Sets src attribute to all images.
     *
     * @name attr
     * @type jQuery
     * @param String key The name of the property to set.
     * @param Object value The value to set the property to.
     * @cat DOM/Attributes
     */
     
    /**
     * Set a single property to a computed value, on all matched elements.
     *
     * Instead of supplying a string value as described
     * [[DOM/Attributes#attr.28_key.2C_value_.29|above]],
     * a function is provided that computes the value.
     *
     * @example $("img").attr("title", function() { return this.src });
     * @before <img src="test.jpg" />
     * @result <img src="test.jpg" title="test.jpg" />
     * @desc Sets title attribute from src attribute.
     *
     * @example $("img").attr("title", function(index) { return this.title + (i + 1); });
     * @before <img title="pic" /><img title="pic" /><img title="pic" />
     * @result <img title="pic1" /><img title="pic2" /><img title="pic3" />
     * @desc Enumerate title attribute.
     *
     * @name attr
     * @type jQuery
     * @param String key The name of the property to set.
     * @param Function value A function returning the value to set.
     *            Scope: Current element, argument: Index of current element
     * @cat DOM/Attributes
     */
    attr: function( key, value, type ) {
        var obj = key;
        
        // Look for the case where we're accessing a style value
        if ( key.constructor == String )
            if ( value == undefined )
                return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
            else {
                obj = {};
                obj[ key ] = value;
            }
        
        // Check to see if we're setting style values
        return this.each(function(index){
            // Set all the styles
            for ( var prop in obj )
                jQuery.attr(
                    type ? this.style : this,
                    prop, jQuery.prop(this, obj[prop], type, index, prop)
                );
        });
    },

    /**
     * Access a style property on the first matched element.
     * This method makes it easy to retrieve a style property value
     * from the first matched element.
     *
     * @example $("p").css("color");
     * @before <p style="color:red;">Test Paragraph.</p>
     * @result "red"
     * @desc Retrieves the color style of the first paragraph
     *
     * @example $("p").css("font-weight");
     * @before <p style="font-weight: bold;">Test Paragraph.</p>
     * @result "bold"
     * @desc Retrieves the font-weight style of the first paragraph.
     *
     * @name css
     * @type String
     * @param String name The name of the property to access.
     * @cat CSS
     */

    /**
     * Set a key/value object as style properties to all matched elements.
     *
     * This serves as the best way to set a large number of style properties
     * on all matched elements.
     *
     * @example $("p").css({ color: "red", background: "blue" });
     * @before <p>Test Paragraph.</p>
     * @result <p style="color:red; background:blue;">Test Paragraph.</p>
     * @desc Sets color and background styles to all p elements.
     *
     * @name css
     * @type jQuery
     * @param Map properties Key/value pairs to set as style properties.
     * @cat CSS
     */

    /**
     * Set a single style property to a value, on all matched elements.
     * If a number is provided, it is automatically converted into a pixel value.
     *
     * @example $("p").css("color","red");
     * @before <p>Test Paragraph.</p>
     * @result <p style="color:red;">Test Paragraph.</p>
     * @desc Changes the color of all paragraphs to red
     *
     * @example $("p").css("left",30);
     * @before <p>Test Paragraph.</p>
     * @result <p style="left:30px;">Test Paragraph.</p>
     * @desc Changes the left of all paragraphs to "30px"
     *
     * @name css
     * @type jQuery
     * @param String key The name of the property to set.
     * @param String|Number value The value to set the property to.
     * @cat CSS
     */
    css: function( key, value ) {
        return this.attr( key, value, "curCSS" );
    },

    /**
     * Get the text contents of all matched elements. The result is
     * a string that contains the combined text contents of all matched
     * elements. This method works on both HTML and XML documents.
     *
     * @example $("p").text();
     * @before <p><b>Test</b> Paragraph.</p><p>Paraparagraph</p>
     * @result Test Paragraph.Paraparagraph
     * @desc Gets the concatenated text of all paragraphs
     *
     * @name text
     * @type String
     * @cat DOM/Attributes
     */

    /**
     * Set the text contents of all matched elements.
     *
     * Similar to html(), but escapes HTML (replace "<" and ">" with their
     * HTML entities).
     *
     * @example $("p").text("<b>Some</b> new text.");
     * @before <p>Test Paragraph.</p>
     * @result <p>&lt;b&gt;Some&lt;/b&gt; new text.</p>
     * @desc Sets the text of all paragraphs.
     *
     * @example $("p").text("<b>Some</b> new text.", true);
     * @before <p>Test Paragraph.</p>
     * @result <p>Some new text.</p>
     * @desc Sets the text of all paragraphs.
     *
     * @name text
     * @type String
     * @param String val The text value to set the contents of the element to.
     * @cat DOM/Attributes
     */
    text: function(e) {
        if ( typeof e == "string" )
            return this.empty().append( document.createTextNode( e ) );

        var t = "";
        jQuery.each( e || this, function(){
            jQuery.each( this.childNodes, function(){
                if ( this.nodeType != 8 )
                    t += this.nodeType != 1 ?
                        this.nodeValue : jQuery.fn.text([ this ]);
            });
        });
        return t;
    },

    /**
     * Wrap all matched elements with a structure of other elements.
     * This wrapping process is most useful for injecting additional
     * stucture into a document, without ruining the original semantic
     * qualities of a document.
     *
     * This works by going through the first element
     * provided (which is generated, on the fly, from the provided HTML)
     * and finds the deepest ancestor element within its
     * structure - it is that element that will en-wrap everything else.
     *
     * This does not work with elements that contain text. Any necessary text
     * must be added after the wrapping is done.
     *
     * @example $("p").wrap("<div class='wrap'></div>");
     * @before <p>Test Paragraph.</p>
     * @result <div class='wrap'><p>Test Paragraph.</p></div>
     * 
     * @name wrap
     * @type jQuery
     * @param String html A string of HTML, that will be created on the fly and wrapped around the target.
     * @cat DOM/Manipulation
     */

    /**
     * Wrap all matched elements with a structure of other elements.
     * This wrapping process is most useful for injecting additional
     * stucture into a document, without ruining the original semantic
     * qualities of a document.
     *
     * This works by going through the first element
     * provided and finding the deepest ancestor element within its
     * structure - it is that element that will en-wrap everything else.
     *

      * This does not work with elements that contain text. Any necessary text
     * must be added after the wrapping is done.
     *
     * @example $("p").wrap( document.getElementById('content') );
     * @before <p>Test Paragraph.</p><div id="content"></div>
     * @result <div id="content"><p>Test Paragraph.</p></div>
     *
     * @name wrap
     * @type jQuery
     * @param Element elem A DOM element that will be wrapped around the target.
     * @cat DOM/Manipulation
     */
    wrap: function() {
        // The elements to wrap the target around
        var a = jQuery.clean(arguments);

        // Wrap each of the matched elements individually
        return this.each(function(){
            // Clone the structure that we're using to wrap
            var b = a[0].cloneNode(true);

            // Insert it before the element to be wrapped
            this.parentNode.insertBefore( b, this );

            // Find the deepest point in the wrap structure
            while ( b.firstChild )
                b = b.firstChild;

            // Move the matched element to within the wrap structure
            b.appendChild( this );
        });
    },

    /**
     * Append content to the inside of every matched element.
     *
     * This operation is similar to doing an appendChild to all the
     * specified elements, adding them into the document.
     *
     * @example $("p").append("<b>Hello</b>");
     * @before <p>I would like to say: </p>
     * @result <p>I would like to say: <b>Hello</b></p>
     * @desc Appends some HTML to all paragraphs.
     *
     * @example $("p").append( $("#foo")[0] );
     * @before <p>I would like to say: </p><b id="foo">Hello</b>
     * @result <p>I would like to say: <b id="foo">Hello</b></p>
     * @desc Appends an Element to all paragraphs.
     *
     * @example $("p").append( $("b") );
     * @before <p>I would like to say: </p><b>Hello</b>
     * @result <p>I would like to say: <b>Hello</b></p>
     * @desc Appends a jQuery object (similar to an Array of DOM Elements) to all paragraphs.
     *
     * @name append
     * @type jQuery
     * @param <Content> content Content to append to the target
     * @cat DOM/Manipulation
     * @see prepend(<Content>)
     * @see before(<Content>)
     * @see after(<Content>)
     */
    append: function() {
        return this.domManip(arguments, true, 1, function(a){
            this.appendChild( a );
        });
    },

    /**
     * Prepend content to the inside of every matched element.
     *
     * This operation is the best way to insert elements
     * inside, at the beginning, of all matched elements.
     *
     * @example $("p").prepend("<b>Hello</b>");
     * @before <p>I would like to say: </p>
     * @result <p><b>Hello</b>I would like to say: </p>
     * @desc Prepends some HTML to all paragraphs.
     *
     * @example $("p").prepend( $("#foo")[0] );
     * @before <p>I would like to say: </p><b id="foo">Hello</b>
     * @result <p><b id="foo">Hello</b>I would like to say: </p>
     * @desc Prepends an Element to all paragraphs.
     *    
     * @example $("p").prepend( $("b") );
     * @before <p>I would like to say: </p><b>Hello</b>
     * @result <p><b>Hello</b>I would like to say: </p>
     * @desc Prepends a jQuery object (similar to an Array of DOM Elements) to all paragraphs.
     *
     * @name prepend
     * @type jQuery
     * @param <Content> content Content to prepend to the target.
     * @cat DOM/Manipulation
     * @see append(<Content>)
     * @see before(<Content>)
     * @see after(<Content>)
     */
    prepend: function() {
        return this.domManip(arguments, true, -1, function(a){
            this.insertBefore( a, this.firstChild );
        });
    },
    
    /**
     * Insert content before each of the matched elements.
     *
     * @example $("p").before("<b>Hello</b>");
     * @before <p>I would like to say: </p>
     * @result <b>Hello</b><p>I would like to say: </p>
     * @desc Inserts some HTML before all paragraphs.
     *
     * @example $("p").before( $("#foo")[0] );
     * @before <p>I would like to say: </p><b id="foo">Hello</b>
     * @result <b id="foo">Hello</b><p>I would like to say: </p>
     * @desc Inserts an Element before all paragraphs.
     *
     * @example $("p").before( $("b") );
     * @before <p>I would like to say: </p><b>Hello</b>
     * @result <b>Hello</b><p>I would like to say: </p>
     * @desc Inserts a jQuery object (similar to an Array of DOM Elements) before all paragraphs.
     *
     * @name before
     * @type jQuery
     * @param <Content> content Content to insert before each target.
     * @cat DOM/Manipulation
     * @see append(<Content>)
     * @see prepend(<Content>)
     * @see after(<Content>)
     */
    before: function() {
        return this.domManip(arguments, false, 1, function(a){
            this.parentNode.insertBefore( a, this );
        });
    },

    /**
     * Insert content after each of the matched elements.
     *
     * @example $("p").after("<b>Hello</b>");
     * @before <p>I would like to say: </p>
     * @result <p>I would like to say: </p><b>Hello</b>
     * @desc Inserts some HTML after all paragraphs.
     *
     * @example $("p").after( $("#foo")[0] );
     * @before <b id="foo">Hello</b><p>I would like to say: </p>
     * @result <p>I would like to say: </p><b id="foo">Hello</b>
     * @desc Inserts an Element after all paragraphs.
     *
     * @example $("p").after( $("b") );
     * @before <b>Hello</b><p>I would like to say: </p>
     * @result <p>I would like to say: </p><b>Hello</b>
     * @desc Inserts a jQuery object (similar to an Array of DOM Elements) after all paragraphs.
     *
     * @name after
     * @type jQuery
     * @param <Content> content Content to insert after each target.
     * @cat DOM/Manipulation
     * @see append(<Content>)
     * @see prepend(<Content>)
     * @see before(<Content>)
     */
    after: function() {
        return this.domManip(arguments, false, -1, function(a){
            this.parentNode.insertBefore( a, this.nextSibling );
        });
    },

    /**
     * Revert the most recent 'destructive' operation, changing the set of matched elements
     * to its previous state (right before the destructive operation).
     *
     * If there was no destructive operation before, an empty set is returned.
     *
     * A 'destructive' operation is any operation that changes the set of
     * matched jQuery elements. These functions are: <code>add</code>,
     * <code>children</code>, <code>clone</code>, <code>filter</code>,
     * <code>find</code>, <code>not</code>, <code>next</code>,
     * <code>parent</code>, <code>parents</code>, <code>prev</code> and <code>siblings</code>.
     *
     * @example $("p").find("span").end();
     * @before <p><span>Hello</span>, how are you?</p>
     * @result [ <p>...</p> ]
     * @desc Selects all paragraphs, finds span elements inside these, and reverts the
     * selection back to the paragraphs.
     *
     * @name end
     * @type jQuery
     * @cat DOM/Traversing
     */
    end: function() {
        return this.prevObject || jQuery([]);
    },

    /**
     * Searches for all elements that match the specified expression.
     
     * This method is a good way to find additional descendant
     * elements with which to process.
     *
     * All searching is done using a jQuery expression. The expression can be
     * written using CSS 1-3 Selector syntax, or basic XPath.
     *
     * @example $("p").find("span");
     * @before <p><span>Hello</span>, how are you?</p>
     * @result [ <span>Hello</span> ]
     * @desc Starts with all paragraphs and searches for descendant span
     * elements, same as $("p span")
     *
     * @name find
     * @type jQuery
     * @param String expr An expression to search with.
     * @cat DOM/Traversing
     */
    find: function(t) {
        return this.pushStack( jQuery.map( this, function(a){
            return jQuery.find(t,a);
        }), t );
    },

    /**
     * Clone matched DOM Elements and select the clones. 
     *
     * This is useful for moving copies of the elements to another
     * location in the DOM.
     *
     * @example $("b").clone().prependTo("p");
     * @before <b>Hello</b><p>, how are you?</p>
     * @result <b>Hello</b><p><b>Hello</b>, how are you?</p>
     * @desc Clones all b elements (and selects the clones) and prepends them to all paragraphs.
     *
     * @name clone
     * @type jQuery
     * @param Boolean deep (Optional) Set to false if you don't want to clone all descendant nodes, in addition to the element itself.
     * @cat DOM/Manipulation
     */
    clone: function(deep) {
        return this.pushStack( jQuery.map( this, function(a){
            var a = a.cloneNode( deep != undefined ? deep : true );
            a.$events = null; // drop $events expando to avoid firing incorrect events
            return a;
        }) );
    },

    /**
     * Removes all elements from the set of matched elements that do not
     * match the specified expression(s). This method is used to narrow down
     * the results of a search.
     *
     * Provide a comma-separated list of expressions to apply multiple filters at once.
     *
     * @example $("p").filter(".selected")
     * @before <p class="selected">Hello</p><p>How are you?</p>
     * @result [ <p class="selected">Hello</p> ]
     * @desc Selects all paragraphs and removes those without a class "selected".
     *
     * @example $("p").filter(".selected, :first")
     * @before <p>Hello</p><p>Hello Again</p><p class="selected">And Again</p>
     * @result [ <p>Hello</p>, <p class="selected">And Again</p> ]
     * @desc Selects all paragraphs and removes those without class "selected" and being the first one.
     *
     * @name filter
     * @type jQuery
     * @param String expression Expression(s) to search with.
     * @cat DOM/Traversing
     */
     
    /**
     * Removes all elements from the set of matched elements that do not
     * pass the specified filter. This method is used to narrow down
     * the results of a search.
     *
     * @example $("p").filter(function(index) {
     *   return $("ol", this).length == 0;
     * })
     * @before <p><ol><li>Hello</li></ol></p><p>How are you?</p>
     * @result [ <p>How are you?</p> ]
     * @desc Remove all elements that have a child ol element
     *
     * @name filter
     * @type jQuery
     * @param Function filter A function to use for filtering
     * @cat DOM/Traversing
     */
    filter: function(t) {
        return this.pushStack(
            jQuery.isFunction( t ) &&
            jQuery.grep(this, function(el, index){
                return t.apply(el, [index])
            }) ||

            jQuery.multiFilter(t,this) );
    },

    /**
     * Removes the specified Element from the set of matched elements. This
     * method is used to remove a single Element from a jQuery object.
     *
     * @example $("p").not( $("#selected")[0] )
     * @before <p>Hello</p><p id="selected">Hello Again</p>
     * @result [ <p>Hello</p> ]
     * @desc Removes the element with the ID "selected" from the set of all paragraphs.
     *
     * @name not
     * @type jQuery
     * @param Element el An element to remove from the set
     * @cat DOM/Traversing
     */

    /**
     * Removes elements matching the specified expression from the set
     * of matched elements. This method is used to remove one or more
     * elements from a jQuery object.
     *
     * @example $("p").not("#selected")
     * @before <p>Hello</p><p id="selected">Hello Again</p>
     * @result [ <p>Hello</p> ]
     * @desc Removes the element with the ID "selected" from the set of all paragraphs.
     *
     * @name not
     * @type jQuery
     * @param String expr An expression with which to remove matching elements
     * @cat DOM/Traversing
     */

    /**
     * Removes any elements inside the array of elements from the set
     * of matched elements. This method is used to remove one or more
     * elements from a jQuery object.
     *
     * Please note: the expression cannot use a reference to the
     * element name. See the two examples below.
     *
     * @example $("p").not( $("div p.selected") )
     * @before <div><p>Hello</p><p class="selected">Hello Again</p></div>
     * @result [ <p>Hello</p> ]
     * @desc Removes all elements that match "div p.selected" from the total set of all paragraphs.
     *
     * @name not
     * @type jQuery
     * @param jQuery elems A set of elements to remove from the jQuery set of matched elements.
     * @cat DOM/Traversing
     */
    not: function(t) {
        return this.pushStack(
            t.constructor == String &&
            jQuery.multiFilter(t, this, true) ||

            jQuery.grep(this, function(a) {
                return ( t.constructor == Array || t.jquery )
                    ? jQuery.inArray( a, t ) < 0
                    : a != t;
            })
        );
    },

    /**
     * Adds more elements, matched by the given expression,
     * to the set of matched elements.
     *
     * @example $("p").add("span")
     * @before (HTML) <p>Hello</p><span>Hello Again</span>
     * @result (jQuery object matching 2 elements) [ <p>Hello</p>, <span>Hello Again</span> ]
     * @desc Compare the above result to the result of <code>$('p')</code>,
     * which would just result in <code><nowiki>[ <p>Hello</p> ]</nowiki></code>.
     * Using add(), matched elements of <code>$('span')</code> are simply
     * added to the returned jQuery-object.
     *
     * @name add
     * @type jQuery
     * @param String expr An expression whose matched elements are added
     * @cat DOM/Traversing
     */
     
    /**
     * Adds more elements, created on the fly, to the set of
     * matched elements.
     *
     * @example $("p").add("<span>Again</span>")
     * @before <p>Hello</p>
     * @result [ <p>Hello</p>, <span>Again</span> ]
     *
     * @name add
     * @type jQuery
     * @param String html A string of HTML to create on the fly.
     * @cat DOM/Traversing
     */

    /**
     * Adds one or more Elements to the set of matched elements.
     *
     * @example $("p").add( document.getElementById("a") )
     * @before <p>Hello</p><p><span id="a">Hello Again</span></p>
     * @result [ <p>Hello</p>, <span id="a">Hello Again</span> ]
     *
     * @example $("p").add( document.forms[0].elements )
     * @before <p>Hello</p><p><form><input/><button/></form>
     * @result [ <p>Hello</p>, <input/>, <button/> ]
     *
     * @name add
     * @type jQuery
     * @param Element|Array<Element> elements One or more Elements to add
     * @cat DOM/Traversing
     */
    add: function(t) {
        return this.pushStack( jQuery.merge(
            this.get(),
            t.constructor == String ?
                jQuery(t).get() :
                t.length != undefined && (!t.nodeName || t.nodeName == "FORM") ?
                    t : [t] )
        );
    },

    /**
     * Checks the current selection against an expression and returns true,
     * if at least one element of the selection fits the given expression.
     *
     * Does return false, if no element fits or the expression is not valid.
     *
     * filter(String) is used internally, therefore all rules that apply there
     * apply here, too.
     *
     * @example $("input[@type='checkbox']").parent().is("form")
     * @before <form><input type="checkbox" /></form>
     * @result true
     * @desc Returns true, because the parent of the input is a form element
     * 
     * @example $("input[@type='checkbox']").parent().is("form")
     * @before <form><p><input type="checkbox" /></p></form>
     * @result false
     * @desc Returns false, because the parent of the input is a p element
     *
     * @name is
     * @type Boolean
     * @param String expr The expression with which to filter
     * @cat DOM/Traversing
     */
    is: function(expr) {
        return expr ? jQuery.filter(expr,this).r.length > 0 : false;
    },
    
    /**
     * Get the content of the value attribute of the first matched element.
     *
     * Use caution when relying on this function to check the value of
     * multiple-select elements and checkboxes in a form. While it will
     * still work as intended, it may not accurately represent the value
     * the server will receive because these elements may send an array
     * of values. For more robust handling of field values, see the
     * [http://www. fieldValue function of the Form Plugin].
     *
     * @example $("input").val();
     * @before <input type="text" value="some text"/>
     * @result "some text"
     *
     * @name val
     * @type String
     * @cat DOM/Attributes
     */
    
    /**
     *     Set the value attribute of every matched element.
     *
     * @example $("input").val("test");
     * @before <input type="text" value="some text"/>
     * @result <input type="text" value="test"/>
     *
     * @name val
     * @type jQuery
     * @param String val Set the property to the specified value.
     * @cat DOM/Attributes
     */
    val: function( val ) {
        return val == undefined ?
            ( this.length ? this[0].value : null ) :
            this.attr( "value", val );
    },
    
    /**
     * Get the html contents of the first matched element.
     * This property is not available on XML documents.
     *
     * @example $("div").html();
     * @before <div><input/></div>
     * @result <input/>
     *
     * @name html
     * @type String
     * @cat DOM/Attributes
     */
    
    /**
     * Set the html contents of every matched element.
     * This property is not available on XML documents.
     *
     * @example $("div").html("<b>new stuff</b>");
     * @before <div><input/></div>
     * @result <div><b>new stuff</b></div>
     *
     * @name html
     * @type jQuery
     * @param String val Set the html contents to the specified value.
     * @cat DOM/Attributes
     */
    html: function( val ) {
        return val == undefined ?
            ( this.length ? this[0].innerHTML : null ) :
            this.empty().append( val );
    },
    
    /**
     * @private
     * @name domManip
     * @param Array args
     * @param Boolean table Insert TBODY in TABLEs if one is not found.
     * @param Number dir If dir<0, process args in reverse order.
     * @param Function fn The function doing the DOM manipulation.
     * @type jQuery
     * @cat Core
     */
    domManip: function(args, table, dir, fn){
        var clone = this.length > 1; 
        var a = jQuery.clean(args);
        if ( dir < 0 )
            a.reverse();

        return this.each(function(){
            var obj = this;

            if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") )
                obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));

            jQuery.each( a, function(){
                fn.apply( obj, [ clone ? this.cloneNode(true) : this ] );
            });

        });
    }
};

/**

 * Extends the jQuery object itself. Can be used to add functions into

 * the jQuery namespace and to [[Plugins/Authoring|add plugin methods]] (plugins).

 * 

 * @example jQuery.fn.extend({

 *   check: function() {

 *     return this.each(function() { this.checked = true; });

 *   },

 *   uncheck: function() {

 *     return this.each(function() { this.checked = false; });

 *   }

 * });

 * $("input[@type=checkbox]").check();

 * $("input[@type=radio]").uncheck();

 * @desc Adds two plugin methods.

 *

 * @example jQuery.extend({

 *   min: function(a, b) { return a < b ? a : b; },

 *   max: function(a, b) { return a > b ? a : b; }

 * });

 * @desc Adds two functions into the jQuery namespace

 *

 * @name $.extend

 * @param Object prop The object that will be merged into the jQuery object

 * @type Object

 * @cat Core

 */

/**

 * Extend one object with one or more others, returning the original,

 * modified, object. This is a great utility for simple inheritance.

 * 

 * @example var settings = { validate: false, limit: 5, name: "foo" };

 * var options = { validate: true, name: "bar" };

 * jQuery.extend(settings, options);

 * @result settings == { validate: true, limit: 5, name: "bar" }

 * @desc Merge settings and options, modifying settings

 *

 * @example var defaults = { validate: false, limit: 5, name: "foo" };

 * var options = { validate: true, name: "bar" };

 * var settings = jQuery.extend({}, defaults, options);

 * @result settings == { validate: true, limit: 5, name: "bar" }

 * @desc Merge defaults and options, without modifying the defaults

 *

 * @name $.extend

 * @param Object target The object to extend

 * @param Object prop1 The object that will be merged into the first.

 * @param Object propN (optional) More objects to merge into the first

 * @type Object

 * @cat JavaScript

 */
jQuery.extend = jQuery.fn.extend = function() {
    // copy reference to target object
    var target = arguments[0],
        a = 1;

    // extend jQuery itself if only one argument is passed
    if ( arguments.length == 1 ) {
        target = this;
        a = 0;
    }
    var prop;
    while (prop = arguments[a++])
        // Extend the base object
        for ( var i in prop ) target[i] = prop[i];

    // Return the modified object
    return target;
};

jQuery.extend({
    /**
     * Run this function to give control of the $ variable back
     * to whichever library first implemented it. This helps to make 
     * sure that jQuery doesn't conflict with the $ object
     * of other libraries.
     *
     * By using this function, you will only be able to access jQuery
     * using the 'jQuery' variable. For example, where you used to do
     * $("div p"), you now must do jQuery("div p").
     *
     * @example jQuery.noConflict();
     * // Do something with jQuery
     * jQuery("div p").hide();
     * // Do something with another library's $()
     * $("content").style.display = 'none';
     * @desc Maps the original object that was referenced by $ back to $
     *
     * @example jQuery.noConflict();
     * (function($) { 
     *   $(function() {
     *     // more code using $ as alias to jQuery
     *   });
     * })(jQuery);
     * // other code using $ as an alias to the other library
     * @desc Reverts the $ alias and then creates and executes a
     * function to provide the $ as a jQuery alias inside the functions
     * scope. Inside the function the original $ object is not available.
     * This works well for most plugins that don't rely on any other library.
     * 
     *
     * @name $.noConflict
     * @type undefined
     * @cat Core 
     */
    noConflict: function() {
        if ( jQuery._$ )
            $ = jQuery._$;
        return jQuery;
    },

    // This may seem like some crazy code, but trust me when I say that this
    // is the only cross-browser way to do this. --John
    isFunction: function( fn ) {
        return !!fn && typeof fn != "string" && !fn.nodeName && 
            typeof fn[0] == "undefined" && /function/i.test( fn + "" );
    },
    
    // check if an element is in a XML document
    isXMLDoc: function(elem) {
        return elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
    },

    nodeName: function( elem, name ) {
        return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
    },

Behind the glory of a lonely words
荣耀的背后刻着一道孤独......
2008-08-21 17:05
wanution
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-4-2
收藏
得分:0 
谢谢楼上回答,不过请解释下撒。
2008-08-22 14:08
fanfan912
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-8-22
收藏
得分:0 
昨天也曾看过这个文件,看不懂,来凑个热闹
2008-08-22 14:14
快速回复:谁能解这段javascript代码?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.072886 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved