Benjamin Sterling wrote:
Sean, that is a nice selector.
On 7/30/07, *Sean Catchpole* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Dmitrii, the code Erik Beeson pasted works, here's another option:
$.extend({expr:{":":{mod: "i%m[3]==0"}}}); //adds mod selector
$("tr:mod(3)")
~Sean
The nth-child selector was improved in jQuery 1.1.3, something like
"div:nth-child(2n+1)" is possible:
http://jquery.com/blog/2007/07/01/jquery-113-800-faster-still-20kb/
I think - although I haven't tested - you could achieve the mod selector
with what jQuery already has:
$('tr:nth-child(3n)')
That should select every third row. See here for more information:
http://www.w3.org/TR/css3-selectors/#nth-child-pseudo
--Klaus