Omiod Omiod - 2 years ago 65
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.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download