jQuery CSS3 Selector Beispiele
Felix Geisendörfer hat seine Liebe für jQuery entdeckt und zeigt einige coole Beispiele was man mit jQuery und CSS3 Selectoren anstellen kann.
Ein Beispiel:
jQuery.expr[':'].task = '(i==0 && (arguments.callee.c = 0) || 1)
&& /tr/i.test(a.nodeName)
&& !jQuery.find('th',a).length
&& (arguments.callee.c++ || 1)
&& (m[3] === undefined || m[3] == arguments.callee.c)';
Die Erklärung:
This expression is called up for every element the jQuery CSS engine loops through. If it evaluates to true then the element “matches”, otherwise it’s not included in the resulting jQuery array. My expression here only matches if the element is a ‘tr’, does does not contain a ‘th’ and if the :task(n) parameter matches the nth-task that was found (kept track of in arguments.callee.c).
Possibly related posts (automatically generated)
jQuery CSS3 Selector Beispiele



