Is there any reason why someone would choose to use the nth function within a CSS only rather than applying this through jquery where it’s more compatible with IE.
Should it just be done within jquery to begin with and never used in a stylesheet?
I hope this makes sense and someone can help.
Cheers
CSS is faster for these operations. Put simply, it just gets parsed and added to the elements, but if you use jQuery for this, there is extra JS to be parsed, executed, some loops, function calls… Not that there’s any noticeable time difference on small tables, but still.
It is way smaller to do it with CSS as well. If you really need to support IE, you could always check if the browser used is IE (I think jq has support for this?) and then fallback to js. (which eliminates my above point, but it’s still better to use css.)