I want to exclude first and second element from jquery selector. I tried this:
$(\'p:not(:nth-child(1),:nth-child(2))\')
But this only excludes
Simply:
$('p:gt(1)')
http://api.jquery.com/gt-selector/
Demo http://jsfiddle.net/NtFYq/1/
As Alnitak has pointed out in the comment, if performance is a concern, you can use his solution of slice
slice
Thanks a lot @Alnitak for pointing that out :)