Tilføj: nth-of-type til jQuery - CSS-tricks

Anonim
$.expr(':')('nth-of-type') = function(elem, i, match) ( var parts = match(3).split("+"); return (i + 1 - (parts(1) || 0)) % parseInt(parts(0), 10) === 0; );

Se den originale artikel for mere information om tilføjelse af de andre “af typen” vælgere.