Commits

Anonymous committed 0655603

Shave some msec in the replaceWith

Comments (0)

Files changed (3)

 	Copyright (c) 2009 Michael Cvilic - BeeBole.com
 
 	Thanks to Rog Peppe for the functional JS jump
-	revision: 2.23
+	revision: 2.25
 
 * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 		templates = [];
 
 	//search for the template node(s)
-	if(typeof sel === 'string'){
-		templates = plugins.find(ctxt || document, sel);
-		templates.length === 0 && error('The template "' + sel + '" was not found');
-	}else if(typeof sel === 'object'){
-		templates = [sel];
+	switch(typeof sel){
+		case 'string':
+			templates = plugins.find(ctxt || document, sel);
+			if(templates.length === 0) {
+				error('The template "' + sel + '" was not found');
+			}
+		break;
+		case 'undefined':
+			error('The template root is undefined, check your selector');
+		break;
+		default:
+			templates = [sel];
 	}
 	
 	for(var i = 0, ii = templates.length; i < ii; i++){
 				setstr = function(node, s){
 					// we can have a null parent node
 					// if we get overlapping targets.
-					var pn = node.parentNode;
+					var pn = node.parentNode, t;
 					if(pn){
 						//replace node with s
-						var t = document.createTextNode(s);
-						node.parentNode.insertBefore(t, node.nextSibling);
-						node.parentNode.removeChild(node);
+						t = document.createTextNode(s);
+						pn.insertBefore(t, node.nextSibling);
+						pn.removeChild(node);
+						t = null;
 					}
 				};
 			}else{
 	}
 	
 	function replaceWith(elm, html){
-		var div = document.createElement('DIV'),
-			tagName = elm.tagName.toLowerCase(),
-			ne, pa;
-		if((/td|tr|th/).test(tagName)){
-			var parents = {	tr:{table:'tbody'}, td:{table:{tbody:'tr'}}, th:{table:{thead:'tr'}} };
-			pa = domify( parents[ tagName ] );
-		}else if( ( /tbody|thead|tfoot/ ).test( tagName )){
-			pa = document.createElement('table');
-		}else{
-			pa = document.createElement('span');
+		var tagName = elm.tagName, ne, pa, ep, parent = {TABLE:{}};
+		switch(tagName){
+			case 'TD': parent.TBODY = 'TR';
+			case 'TR': parent.TABLE = 'TBODY';
+			case 'TH': parent.THEAD = 'TR';
+				pa = domify( parent );
+			break;
+			case 'TBODY':case 'THEAD':case 'TFOOT':
+				pa = document.createElement('TABLE');
+			break;
+			default:
+				pa = document.createElement('SPAN');
 		}
-		var ep = elm.parentNode;
-		// avoid IE mem leak
-		ep.insertBefore(pa, elm);
-		ep.removeChild(elm);
+		ep = elm.parentNode;
 		pa.innerHTML = html;
 		ne = pa.firstChild;
-		ep.insertBefore(ne, pa);
-		ep.removeChild(pa);
-		elm = ne;
-
-		pa = ne = ep = null;
-		return elm;
+		ep.replaceChild(ne, elm);
+		return ne;
 	}
 };
 

libs/pure_packed.js

     Copyright (c) 2009 Michael Cvilic - BeeBole.com
 
 	Thanks to Rog Peppe for the functional JS jump
-    revision: 2.23
+    revision: 2.25
 
 * * * * * * * * * * * * * * * * * * * * * * * * * */
-eval(function(p,a,c,k,e,r){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--)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}('9 $p,2p=$p=6(){9 a=2q[0],1V=I;7(x a===\'16\'){1V=2q[1]||I}8 $p.2r(a,1V)};$p.2r=6(l,q,r){9 r=2s(),1c=[];7(x l===\'16\'){1c=r.J(q||F,l);1c.y===0&&G(\'2t 2u "\'+l+\'" 2v 2w 2x\')}A 7(x l===\'1W\'){1c=[l]}B(9 i=0,M=1c.y;i<M;i++){r[i]=1c[i]}r.y=M;9 u=\'3f\'+1C.2y(1C.2z()*2A)+\'1X\',1m=\'3g\'+1C.2y(1C.2z()*2A)+\'1X\',1Y=/^(\\+)?([^\\@\\+]+)?\\@?([^\\+]+)?(\\+)?$/,2B={3h:\'3i\',2C:\'2D\'};8 r;6 G(e){3j(e);7(x 2E!==\'C\'){2E.3k(e);3l}3m(\'2p G: \'+e);}6 2s(){9 a=$p.X,f=6(){};f.Q=a;f.Q.H=a.H||H;f.Q.N=a.N||N;f.Q.O=a.O||O;f.Q.J=a.J||J;f.Q.3n=1n;f.Q.3o=G;8 3p f()}6 1Z(b){8 b.1Z||(6(n){9 a=F.1d(\'3q\'),h;a.20(n.2F(11));h=a.1D;a=17;8 h})(b)}6 1E(o){8 3r.Q.3s.3t(o)==="[1W 3u]"}6 1o(b,f){8 6(a){8 b(\'\'+f(a))}}6 21(a,b){b=b||F.3v();9 c,1p;B(9 n 1e a){c=F.1d(n);b.20(c);7(x a[n]===\'1W\'){1p=21(a[n],c)}A{1p=F.1d(a[n]);c.20(1p)}}8 1p};6 J(n,a){7(x n===\'16\'){a=n;n=I}7(x F.2G!==\'C\'){8(n||F).2G(a)}A{G(\'3w 3x 12 2H 3y 22: 3z, 3A.5+, 3B+ 3C 3D+\\n\\3E 3F 2H 2I 2J 3G, 3H 3I a 3J 3K/3L 22 a 3M 13 3N\')}}6 23(c,d){8 6(a){9 b=[c[0]],n=c.y,1F,1q,1G,1r;B(9 i=1;i<n;i++){1F=d[i](a);1q=c[i];7(1F===\'\'){1G=b[b.y-1];7((1r=1G.3O(/[\\w]+=\\"?$/))>-1){b[b.y-1]=1G.24(0,1r);1q=1q.3P(1)}}b[b.y]=1F;b[b.y]=1q}8 b.25(\'\')}}6 2K(p){9 m=p.1s(/^(\\w+)\\s*<-\\s*(\\S+)?$/);7(m===17){G(\'26 18 2L: "\'+p+\'"\')}7(m[1]===\'1t\'){G(\'"1t<-..." 3Q a 3R 3S B 27 3T 3U 3V.\\n\\3W 3X 3Y 28 B 2J 18.\')}7(!m[2]){m[2]=6(a){8 a.1H}}8{28:m[1],14:m[2]}}6 1f(c){7(x(c)===\'6\'){8 c}9 m=c.1s(/^[a-3Z-Z$1X][\\w$]*(\\.[\\w$-]*[^\\.])*$/);7(m===17){9 d=I,s=c,1I=[],1g=[],i=0,29;7(/\\\'|\\"/.12(s.2M(0))){7(/\\\'|\\"/.12(s.2M(s.y-1))){29=s.24(1,s.y-1);8 6(){8 29}}}A{2N((m=s.1s(/#\\{([^{}]+)\\}/))!==17){d=11;1I[i++]=s.2O(0,m.2P);1g[i]=1f(m[1]);s=s.2O(m.2P+m[0].y,s.y)}}7(!d){G(\'26 1H 13 2Q: \'+c)}1I[i]=s;8 23(1I,1g)}m=c.1J(\'.\');8 6(a){9 b=a.1H;7(!b){8\'\'}9 v=a[m[0]],i=0;7(v){b=v.1t;i+=1}9 n=m.y;B(;i<n;i++){7(!b){2R}b=b[m[i]]}8(!b&&b!==0)?\'\':b}}6 1u(c,d,e){9 f,R,13,D,P,K=[];7(x d===\'16\'){f=d;9 m=d.1s(1Y);7(!m){G(\'26 13 2Q: \'+d)}R=m[1];13=m[2];D=m[3];P=m[4];7(13===\'.\'||(!13&&D)){K[0]=c}A{K=r.J(c,13)}7(!K||K.y===0){8 G(\'2t 1v "\'+d+\'" 2v 2w 2x 1e 27 2u\')}}A{R=d.R;D=d.D;P=d.P;K=[c]}7(R||P){7(R&&P){G(\'P/R 2a 40 41 42 27 43 44\')}A 7(e){G(\'2S P/R/19 45 46 B 18 K\')}A 7(P&&e){G(\'2a P 22 18 (14: \'+f+\')\')}}9 g,1a,T,1w,1h,1x;7(D){1w=(/^2T$/i).12(D);1h=(/^47$/i).12(D);1x=1h?\'1i\':D;g=6(a,s){a.48(1m+D,s);7(1x 1e a&&!1w){a[1x]=\'\'}7(a.2U===1){a.2V(D);1h&&a.2V(1x)}};7(1w){1a=6(a){8 a.2T.49}}A 7(1h){1a=6(a){8 a.1i}}A{1a=6(a){8 a.4a(D)}}7(1w||1h){T=6(s){8 s.19(/\\"/g,\'&2W;\')}}A{T=6(s){8 s.19(/\\"/g,\'&2W;\').19(/\\s/g,\'&4b;\')}}}A{7(e){g=6(a,s){9 b=a.1K;7(b){9 t=F.4c(s);a.1K.2b(t,a.4d);a.1K.2c(a)}}}A{1a=6(a){8 a.1D};g=6(a,s){a.1D=s}}T=6(s){8 s}}9 h;7(R){h=6(a,s){g(a,s+1a(a))}}A 7(P){h=6(a,s){g(a,1a(a)+s)}}A{h=6(a,s){g(a,s)}}8{D:D,L:K,2X:h,14:f,T:T}}6 1y(a,n){9 b=u+n+\':\';B(9 i=0;i<a.L.y;i++){a.2X(a.L[i],b)}}6 2d(e,f,g){8 6(c){9 a=f(c),2e=c[e],1L={2Y:a},2f=[],2g=6(b){c.2Y=a;c.1r=1L.1r=b;c.1t=1L.1t=a[b];2f.2h(g(c))};c[e]=1L;7(1E(a)){B(9 i=0,M=a.y||0;i<M;i++){2g(i)}}A{B(9 d 1e a){a.2i(d)&&2g(d)}}x 2e!==\'C\'?c[e]=2e:4e c[e];8 2f.25(\'\')}}6 2j(a,b,c,d){9 e=I;9 p;B(9 i 1e c){7(c.2i(i)){7(e){G(\'2a 4f 4g 4h 4i 18 2I a K\')}p=i;e=11}}7(!p){G(\'2S 18 2L\')}9 f=c[p];7(x(f)===\'16\'||x(f)===\'6\'){c={};c[p]={4j:f};8 2j(a,b,c,d)}9 g=2K(p),1z=1f(g.14),K=1u(a,b,11),L=K.L;B(i=0;i<L.y;i++){9 h=L[i],1A=1n(h,f);d[d.y]=1o(K.T,2d(g.28,1z,1A));K.L=[h];1y(K,d.y-1)}}6 2Z(n,d){9 e=n.4k(\'*\'),2k=[],1j={a:[],l:{}},z,1M,i,M,j,1k,Y,1N,2l;B(i=-1,M=e.y;i<M;i++){Y=i>-1?e[i]:n;7(Y.2U===1&&Y.1i!==\'\'){1N=Y.1i.1J(\' \');B(j=0,1k=1N.y;j<1k;j++){2l=1N[j];z=30(2l,Y.15);7(z!==I){1M=(/4l/i).12(z.D);7(z.14.1O(\'@\')>-1||1M){Y.1i=Y.1i.19(\'@\'+z.D,\'\');7(1M){z.D=I}}2k.2h({n:Y,z:z})}}}}8 2k;6 30(c,a){9 b=c.1s(1Y),D=b[3]||2B[a],z={R:!!b[1],U:b[2],D:D,P:!!b[4],14:c},i,M,1P,1Q,V;B(i=1j.a.y-1;i>=0;i--){1P=1j.a[i];1Q=1P.l[0];V=1Q&&1Q[z.U];7(x V!==\'C\'){z.U=1P.p+\'.\'+z.U;7(1j.l[z.U]===11){V=V[0]}2R}}7(x V===\'C\'){V=1E(d)?d[0][z.U]:d[z.U];7(x V===\'C\'){8 I}}7(1E(V)){1j.a.2h({l:V,p:z.U});1j.l[z.U]=11;z.t=\'18\'}A{z.t=\'31\'}8 z}}6 1n(a,b,c,d){9 e=[];d=d||c&&2Z(a,c);7(c){9 j,1k,z,n,f,L,1z,1v,1A;2N(d.y>0){z=d[0].z;n=d[0].n;d.4m(0,1);7(z.t===\'31\'){f=1u(n,z,I);1y(f,e.y);e[e.y]=1o(f.T,1f(z.U))}A{1z=1f(z.14);f=1u(n,z,11);L=f.L;B(j=0,1k=L.y;j<1k;j++){1v=L[j];1A=1n(1v,I,c,d);e[e.y]=1o(f.T,2d(z.14,1z,1A));f.L=[1v];1y(f,e.y-1)}}}}9 f,1l;B(9 g 1e b){7(b.2i(g)){1l=b[g];7(x(1l)===\'6\'||x(1l)===\'16\'){f=1u(a,g,I);1y(f,e.y);e[e.y]=1o(f.T,1f(1l))}A{2j(a,g,1l,e)}}}9 h=1Z(a),1g=[];7(a.15===\'4n\'&&h.1O(1m+\'4o\')>0){h=h.19(/\\4p\\s/,\' \')}A 7(a.15===\'2C\'&&h.1O(1m+\'2D\')>0){h=h.19(/\\4q=("|\')(\'|")\\s/,\' \')}h=h.1J(1m).25(\'\');9 k=h.1J(u),p;B(9 i=1;i<k.y;i++){p=k[i];1g[i]=e[4r(p,10)];k[i]=p.24(p.1O(\':\')+1)}8 23(k,1g)}6 H(c,d,e){9 f=1n((e||E[0]).2F(11),c,d);8 6(a,b){b=b||a;8 f({1H:a,2m:b})}}6 N(a,b){9 c=x b===\'6\'?b:r.H(b,I,E[0]);B(9 i=0,M=E.y;i<M;i++){E[i]=2n(E[i],c(a,I))}2m=17;8 E}6 O(a,b){9 c=r.H(b,a,E[0]);B(9 i=0,M=E.y;i<M;i++){E[i]=2n(E[i],c(a,I))}2m=17;8 E}6 2n(a,b){9 c=F.1d(\'4s\'),15=a.15.4t(),1B,W;7((/32|1R|33/).12(15)){9 d={1R:{1S:\'2o\'},32:{1S:{2o:\'1R\'}},33:{1S:{34:\'1R\'}}};W=21(d[15])}A 7((/2o|34|4u/).12(15)){W=F.1d(\'1S\')}A{W=F.1d(\'4v\')}9 e=a.1K;e.2b(W,a);e.2c(a);W.1D=b;1B=W.4w;e.2b(1B,W);e.2c(W);a=1B;W=1B=e=17;8 a}};$p.X={};$p.35={1T:6(){7(x F.1b===\'C\'){$p.X.J=6(n,a){8 1T.4x(a,n)}}},36:6(){7(x F.1b===\'C\'){$p.X.J=6(n,a){8 $(n).4y(a)}}37.4z({4A:[\'H\',\'N\',\'O\'],H:6(a,b){8 $p(E).H(a,b)},N:6(a,b){8 $($p(E).N(a,b))[0]},O:6(a,b){8 $($p(E).O(a,b))[0]}})},38:6(){7(x F.1b===\'C\'){$p.X.J=6(n,a){8 $(n).J(a)}}1U.4B.4C({H:6(a,b){8 $p(E[0]).H(a,b)},N:6(a,b){8 1U($p(E[0]).N(a,b))},O:6(a,b){8 1U($p(E[0]).O(a,b))}})},39:6(){7(x F.1b===\'C\'){$p.X.J=6(n,a){8 $(n).4D(a)}}3a.4E({H:6(a,b){8 $p(E).H(a,b)},N:6(a,b){8 $p(E).N(a,b)},O:6(a,b){8 $p(E).O(a,b)}})},Q:6(){7(x F.1b===\'C\'){$p.X.J=6(n,a){n=n===F?n.4F:n;8 x n===\'16\'?$$(n):$(n).4G(a)}}3a.4H({H:6(a,b,c){8 $p(a).H(b,c)},N:6(a,b,c){8 $p(a).N(b,c)},O:6(a,b,c){8 $p(a).O(b,c)}})},3b:6(){7(x F.1b===\'C\'){$p.X.J=6(n,a){8 3c(a,n)}}},3d:6(){7(x F.1b===\'C\'){$p.X.J=6(n,a){8 3e(a,n)}}}};(6(){9 a=x 1T!==\'C\'&&\'1T\'||x 37!==\'C\'&&\'36\'||x 1U!==\'C\'&&\'38\'||x 4I!==\'C\'&&\'39\'||x 4J!==\'C\'&&\'Q\'||x 3c!==\'C\'&&\'3b\'||x 3e!==\'C\'&&\'3d\';a&&$p.35[a]()})();',62,294,'||||||function|if|return|var||||||||||||||||||||||||typeof|length|cspec|else|for|undefined|attr|this|document|error|compile|false|find|target|nodes|ii|render|autoRender|append|prototype|prepend||quotefn|prop|val|pa|plugins|ni|||true|test|selector|sel|tagName|string|null|loop|replace|getstr|querySelector|templates|createElement|in|dataselectfn|pfns|isClass|className|openLoops|jj|dsel|attPfx|compiler|wrapquote|leaf|pVal|pos|match|item|gettarget|node|isStyle|attName|setsig|itersel|inner|ne|Math|innerHTML|isArray|fnVal|attLine|data|parts|split|parentNode|temp|isNodeValue|cs|indexOf|loopi|loopil|tr|table|dojo|jQuery|ctxt|object|_|selRx|outerHTML|appendChild|domify|with|concatenator|substring|join|bad|the|name|retStr|cannot|insertBefore|removeChild|loopfn|old|strs|buildArg|push|hasOwnProperty|loopgen|an|cj|context|replaceWith|tbody|pure|arguments|core|getPlugins|The|template|was|not|found|floor|random|1000000|autoAttr|INPUT|value|console|cloneNode|querySelectorAll|PURE|on|your|parseloopspec|spec|charAt|while|slice|index|syntax|break|no|style|nodeType|removeAttribute|quot|set|items|getAutoNodes|checkClass|str|td|th|thead|libs|domassistant|DOMAssistant|jquery|mootools|Element|sizzle|Sizzle|sly|Sly|_s|_a|IMG|src|alert|log|debugger|throw|_compiler|_error|new|div|Object|toString|call|Array|createDocumentFragment|You|can|standalone|iPhone|FF3|Safari4|and|IE8|nTo|run|browser|you|need|JS|library|framework|CSS|engine|search|substr|is|reserved|word|current|running|iteration|nPlease|choose|another|zA|take|place|at|same|time|modifiers|allowed|class|setAttribute|cssText|getAttribute|nbsp|createTextNode|nextSibling|delete|have|more|than|one|root|getElementsByTagName|nodevalue|splice|OPTION|selected|sselected|svalue|parseInt|DIV|toLowerCase|tfoot|span|firstChild|query|cssSelect|attach|publicMethods|fn|extend|getElements|implement|body|select|addMethods|MooTools|Prototype'.split('|'),0,{}))
+eval(function(p,a,c,k,e,r){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--)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}('9 $p,2s=$p=6(){9 a=2t[0],1V=I;7(y a===\'14\'){1V=2t[1]||I}8 $p.2u(a,1V)};$p.2u=6(l,q,r){9 r=2v(),1a=[];2w(y l){11\'14\':1a=r.J(q||F,l);7(1a.x===0){G(\'1W 1X "\'+l+\'" 2x 2y 2z\')}1b;11\'A\':G(\'1W 1X 2A 2B A, 3i 1Y W\');1b;2C:1a=[l]}B(9 i=0,M=1a.x;i<M;i++){r[i]=1a[i]}r.x=M;9 u=\'3j\'+1D.2D(1D.2E()*2F)+\'1Z\',1m=\'3k\'+1D.2D(1D.2E()*2F)+\'1Z\',20=/^(\\+)?([^\\@\\+]+)?\\@?([^\\+]+)?(\\+)?$/,2G={3l:\'3m\',2H:\'2I\'};8 r;6 G(e){3n(e);7(y 2J!==\'A\'){2J.3o(e);3p}3q(\'2s G: \'+e);}6 2v(){9 a=$p.X,f=6(){};f.Q=a;f.Q.H=a.H||H;f.Q.N=a.N||N;f.Q.O=a.O||O;f.Q.J=a.J||J;f.Q.3r=1n;f.Q.3s=G;8 3t f()}6 21(b){8 b.21||(6(n){9 a=F.1o(\'3u\'),h;a.22(n.2K(12));h=a.1E;a=15;8 h})(b)}6 1F(o){8 3v.Q.3w.3x(o)==="[2L 3y]"}6 1p(b,f){8 6(a){8 b(\'\'+f(a))}}6 23(a,b){b=b||F.3z();9 c,1q;B(9 n 1c a){c=F.1o(n);b.22(c);7(y a[n]===\'2L\'){1q=23(a[n],c)}E{1q=F.1o(a[n]);c.22(1q)}}8 1q};6 J(n,a){7(y n===\'14\'){a=n;n=I}7(y F.2M!==\'A\'){8(n||F).2M(a)}E{G(\'3A 3B 1d 2N 3C 24: 3D, 3E.5+, 3F+ 3G 3H+\\n\\3I 3J 2N 2O 1Y 3K, 3L 3M a 3N 3O/3P 24 a 3Q W 3R\')}}6 25(c,d){8 6(a){9 b=[c[0]],n=c.x,1G,1r,1H,1s;B(9 i=1;i<n;i++){1G=d[i](a);1r=c[i];7(1G===\'\'){1H=b[b.x-1];7((1s=1H.3S(/[\\w]+=\\"?$/))>-1){b[b.x-1]=1H.26(0,1s);1r=1r.3T(1)}}b[b.x]=1G;b[b.x]=1r}8 b.27(\'\')}}6 2P(p){9 m=p.1t(/^(\\w+)\\s*<-\\s*(\\S+)?$/);7(m===15){G(\'28 16 2Q: "\'+p+\'"\')}7(m[1]===\'1u\'){G(\'"1u<-..." 2B a 3U 3V B 29 3W 3X 3Y.\\n\\3Z 40 41 2a B 1Y 16.\')}7(!m[2]){m[2]=6(a){8 a.1I}}8{2a:m[1],13:m[2]}}6 1e(c){7(y(c)===\'6\'){8 c}9 m=c.1t(/^[a-42-Z$1Z][\\w$]*(\\.[\\w$-]*[^\\.])*$/);7(m===15){9 d=I,s=c,1J=[],1f=[],i=0,2b;7(/\\\'|\\"/.1d(s.2R(0))){7(/\\\'|\\"/.1d(s.2R(s.x-1))){2b=s.26(1,s.x-1);8 6(){8 2b}}}E{2S((m=s.1t(/#\\{([^{}]+)\\}/))!==15){d=12;1J[i++]=s.2T(0,m.2U);1f[i]=1e(m[1]);s=s.2T(m.2U+m[0].x,s.x)}}7(!d){G(\'28 1I W 2V: \'+c)}1J[i]=s;8 25(1J,1f)}m=c.1K(\'.\');8 6(a){9 b=a.1I;7(!b){8\'\'}9 v=a[m[0]],i=0;7(v){b=v.1u;i+=1}9 n=m.x;B(;i<n;i++){7(!b){1b}b=b[m[i]]}8(!b&&b!==0)?\'\':b}}6 1v(c,d,e){9 f,R,W,C,P,K=[];7(y d===\'14\'){f=d;9 m=d.1t(20);7(!m){G(\'28 W 2V: \'+d)}R=m[1];W=m[2];C=m[3];P=m[4];7(W===\'.\'||(!W&&C)){K[0]=c}E{K=r.J(c,W)}7(!K||K.x===0){8 G(\'1W 1w "\'+d+\'" 2x 2y 2z 1c 29 1X\')}}E{R=d.R;C=d.C;P=d.P;K=[c]}7(R||P){7(R&&P){G(\'P/R 2c 43 44 45 29 46 47\')}E 7(e){G(\'2W P/R/17 48 49 B 16 K\')}E 7(P&&e){G(\'2c P 24 16 (13: \'+f+\')\')}}9 g,18,T,1x,1g,1y;7(C){1x=(/^2X$/i).1d(C);1g=(/^4a$/i).1d(C);1y=1g?\'1h\':C;g=6(a,s){a.4b(1m+C,s);7(1y 1c a&&!1x){a[1y]=\'\'}7(a.2Y===1){a.2Z(C);1g&&a.2Z(1y)}};7(1x){18=6(a){8 a.2X.4c}}E 7(1g){18=6(a){8 a.1h}}E{18=6(a){8 a.4d(C)}}7(1x||1g){T=6(s){8 s.17(/\\"/g,\'&30;\')}}E{T=6(s){8 s.17(/\\"/g,\'&30;\').17(/\\s/g,\'&4e;\')}}}E{7(e){g=6(a,s){9 b=a.31,t;7(b){t=F.4f(s);b.4g(t,a.4h);b.4i(a);t=15}}}E{18=6(a){8 a.1E};g=6(a,s){a.1E=s}}T=6(s){8 s}}9 h;7(R){h=6(a,s){g(a,s+18(a))}}E 7(P){h=6(a,s){g(a,18(a)+s)}}E{h=6(a,s){g(a,s)}}8{C:C,L:K,32:h,13:f,T:T}}6 1z(a,n){9 b=u+n+\':\';B(9 i=0;i<a.L.x;i++){a.32(a.L[i],b)}}6 2d(e,f,g){8 6(c){9 a=f(c),2e=c[e],1L={33:a},2f=[],2g=6(b){c.33=a;c.1s=1L.1s=b;c.1u=1L.1u=a[b];2f.2h(g(c))};c[e]=1L;7(1F(a)){B(9 i=0,M=a.x||0;i<M;i++){2g(i)}}E{B(9 d 1c a){a.2i(d)&&2g(d)}}y 2e!==\'A\'?c[e]=2e:4j c[e];8 2f.27(\'\')}}6 2j(a,b,c,d){9 e=I;9 p;B(9 i 1c c){7(c.2i(i)){7(e){G(\'2c 4k 4l 4m 4n 16 2O a K\')}p=i;e=12}}7(!p){G(\'2W 16 2Q\')}9 f=c[p];7(y(f)===\'14\'||y(f)===\'6\'){c={};c[p]={2A:f};8 2j(a,b,c,d)}9 g=2P(p),1A=1e(g.13),K=1v(a,b,12),L=K.L;B(i=0;i<L.x;i++){9 h=L[i],1B=1n(h,f);d[d.x]=1p(K.T,2d(g.2a,1A,1B));K.L=[h];1z(K,d.x-1)}}6 34(n,d){9 e=n.4o(\'*\'),2k=[],1i={a:[],l:{}},z,1M,i,M,j,1j,Y,1N,2l;B(i=-1,M=e.x;i<M;i++){Y=i>-1?e[i]:n;7(Y.2Y===1&&Y.1h!==\'\'){1N=Y.1h.1K(\' \');B(j=0,1j=1N.x;j<1j;j++){2l=1N[j];z=35(2l,Y.1O);7(z!==I){1M=(/4p/i).1d(z.C);7(z.13.1P(\'@\')>-1||1M){Y.1h=Y.1h.17(\'@\'+z.C,\'\');7(1M){z.C=I}}2k.2h({n:Y,z:z})}}}}8 2k;6 35(c,a){9 b=c.1t(20),C=b[3]||2G[a],z={R:!!b[1],U:b[2],C:C,P:!!b[4],13:c},i,M,1Q,1R,V;B(i=1i.a.x-1;i>=0;i--){1Q=1i.a[i];1R=1Q.l[0];V=1R&&1R[z.U];7(y V!==\'A\'){z.U=1Q.p+\'.\'+z.U;7(1i.l[z.U]===12){V=V[0]}1b}}7(y V===\'A\'){V=1F(d)?d[0][z.U]:d[z.U];7(y V===\'A\'){8 I}}7(1F(V)){1i.a.2h({l:V,p:z.U});1i.l[z.U]=12;z.t=\'16\'}E{z.t=\'36\'}8 z}}6 1n(a,b,c,d){9 e=[];d=d||c&&34(a,c);7(c){9 j,1j,z,n,f,L,1A,1w,1B;2S(d.x>0){z=d[0].z;n=d[0].n;d.4q(0,1);7(z.t===\'36\'){f=1v(n,z,I);1z(f,e.x);e[e.x]=1p(f.T,1e(z.U))}E{1A=1e(z.13);f=1v(n,z,12);L=f.L;B(j=0,1j=L.x;j<1j;j++){1w=L[j];1B=1n(1w,I,c,d);e[e.x]=1p(f.T,2d(z.13,1A,1B));f.L=[1w];1z(f,e.x-1)}}}}9 f,1k;B(9 g 1c b){7(b.2i(g)){1k=b[g];7(y(1k)===\'6\'||y(1k)===\'14\'){f=1v(a,g,I);1z(f,e.x);e[e.x]=1p(f.T,1e(1k))}E{2j(a,g,1k,e)}}}9 h=21(a),1f=[];7(a.1O===\'4r\'&&h.1P(1m+\'4s\')>0){h=h.17(/\\4t\\s/,\' \')}E 7(a.1O===\'2H\'&&h.1P(1m+\'2I\')>0){h=h.17(/\\4u=("|\')(\'|")\\s/,\' \')}h=h.1K(1m).27(\'\');9 k=h.1K(u),p;B(9 i=1;i<k.x;i++){p=k[i];1f[i]=e[4v(p,10)];k[i]=p.26(p.1P(\':\')+1)}8 25(k,1f)}6 H(c,d,e){9 f=1n((e||D[0]).2K(12),c,d);8 6(a,b){b=b||a;8 f({1I:a,2m:b})}}6 N(a,b){9 c=y b===\'6\'?b:r.H(b,I,D[0]);B(9 i=0,M=D.x;i<M;i++){D[i]=2n(D[i],c(a,I))}2m=15;8 D}6 O(a,b){9 c=r.H(b,a,D[0]);B(9 i=0,M=D.x;i<M;i++){D[i]=2n(D[i],c(a,I))}2m=15;8 D}6 2n(a,b){9 c=a.1O,1S,1l,2o,1C={2p:{}};2w(c){11\'4w\':1C.2q=\'2r\';11\'2r\':1C.2p=\'2q\';11\'4x\':1C.37=\'2r\';1l=23(1C);1b;11\'2q\':11\'37\':11\'4y\':1l=F.1o(\'2p\');1b;2C:1l=F.1o(\'4z\')}2o=a.31;1l.1E=b;1S=1l.4A;2o.4B(1S,a);8 1S}};$p.X={};$p.38={1T:6(){7(y F.19===\'A\'){$p.X.J=6(n,a){8 1T.4C(a,n)}}},39:6(){7(y F.19===\'A\'){$p.X.J=6(n,a){8 $(n).4D(a)}}3a.4E({4F:[\'H\',\'N\',\'O\'],H:6(a,b){8 $p(D).H(a,b)},N:6(a,b){8 $($p(D).N(a,b))[0]},O:6(a,b){8 $($p(D).O(a,b))[0]}})},3b:6(){7(y F.19===\'A\'){$p.X.J=6(n,a){8 $(n).J(a)}}1U.4G.4H({H:6(a,b){8 $p(D[0]).H(a,b)},N:6(a,b){8 1U($p(D[0]).N(a,b))},O:6(a,b){8 1U($p(D[0]).O(a,b))}})},3c:6(){7(y F.19===\'A\'){$p.X.J=6(n,a){8 $(n).4I(a)}}3d.4J({H:6(a,b){8 $p(D).H(a,b)},N:6(a,b){8 $p(D).N(a,b)},O:6(a,b){8 $p(D).O(a,b)}})},Q:6(){7(y F.19===\'A\'){$p.X.J=6(n,a){n=n===F?n.4K:n;8 y n===\'14\'?$$(n):$(n).4L(a)}}3d.4M({H:6(a,b,c){8 $p(a).H(b,c)},N:6(a,b,c){8 $p(a).N(b,c)},O:6(a,b,c){8 $p(a).O(b,c)}})},3e:6(){7(y F.19===\'A\'){$p.X.J=6(n,a){8 3f(a,n)}}},3g:6(){7(y F.19===\'A\'){$p.X.J=6(n,a){8 3h(a,n)}}}};(6(){9 a=y 1T!==\'A\'&&\'1T\'||y 3a!==\'A\'&&\'39\'||y 1U!==\'A\'&&\'3b\'||y 4N!==\'A\'&&\'3c\'||y 4O!==\'A\'&&\'Q\'||y 3f!==\'A\'&&\'3e\'||y 3h!==\'A\'&&\'3g\';a&&$p.38[a]()})();',62,299,'||||||function|if|return|var||||||||||||||||||||||||length|typeof|cspec|undefined|for|attr|this|else|document|error|compile|false|find|target|nodes|ii|render|autoRender|append|prototype|prepend||quotefn|prop|val|selector|plugins|ni|||case|true|sel|string|null|loop|replace|getstr|querySelector|templates|break|in|test|dataselectfn|pfns|isClass|className|openLoops|jj|dsel|pa|attPfx|compiler|createElement|wrapquote|leaf|pVal|pos|match|item|gettarget|node|isStyle|attName|setsig|itersel|inner|parent|Math|innerHTML|isArray|fnVal|attLine|data|parts|split|temp|isNodeValue|cs|tagName|indexOf|loopi|loopil|ne|dojo|jQuery|ctxt|The|template|your|_|selRx|outerHTML|appendChild|domify|with|concatenator|substring|join|bad|the|name|retStr|cannot|loopfn|old|strs|buildArg|push|hasOwnProperty|loopgen|an|cj|context|replaceWith|ep|TABLE|TBODY|TR|pure|arguments|core|getPlugins|switch|was|not|found|root|is|default|floor|random|1000000|autoAttr|INPUT|value|console|cloneNode|object|querySelectorAll|PURE|on|parseloopspec|spec|charAt|while|slice|index|syntax|no|style|nodeType|removeAttribute|quot|parentNode|set|items|getAutoNodes|checkClass|str|THEAD|libs|domassistant|DOMAssistant|jquery|mootools|Element|sizzle|Sizzle|sly|Sly|check|_s|_a|IMG|src|alert|log|debugger|throw|_compiler|_error|new|div|Object|toString|call|Array|createDocumentFragment|You|can|standalone|iPhone|FF3|Safari4|and|IE8|nTo|run|browser|you|need|JS|library|framework|CSS|engine|search|substr|reserved|word|current|running|iteration|nPlease|choose|another|zA|take|place|at|same|time|modifiers|allowed|class|setAttribute|cssText|getAttribute|nbsp|createTextNode|insertBefore|nextSibling|removeChild|delete|have|more|than|one|getElementsByTagName|nodevalue|splice|OPTION|selected|sselected|svalue|parseInt|TD|TH|TFOOT|SPAN|firstChild|replaceChild|query|cssSelect|attach|publicMethods|fn|extend|getElements|implement|body|select|addMethods|MooTools|Prototype'.split('|'),0,{}))

tutorial/tuto3.html

 </head>
 <body>
 	<!-- HTML template -->
-	<ul>
+	<ol>
 		<!-- Explanation of the classes of the LI:
 			* 	"animals" points to an array and will trigger an iteration
 			
 				the node value of the LI
 		 -->
 		<li class="animals name"></li>
-	</ul>
+	</ol>
 
 	<script>
 		// animals is an array and will trigger an iteration
 			]
 		};
 		
-		$('ul').autoRender(data);
+		$('ol').autoRender(data);
 	</script>
 </body>
 </html>