Omiod Omiod - 3 months ago 6x
jQuery Question

Selecting the first "n" items with jQuery

With Jquery, I need to select just the first "n" items from the page, for example the first 20 links instead of selecting all of them with the usual


Sounds simple but the jQuery manual has no evidence of something like this.


You probably want to read up on slice. Your code will look something like this: