dio-v
12/4/2013 - 6:23 AM

Add :nth-of-type to jQuery

Add :nth-of-type to jQuery

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