[jQuery] Re: How can the selector match the last 2 selected element.
Thanq Karl, and thank Mike Alsup too On Jul 18, 9:50 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > On Jul 18, 2008, at 9:22 AM, Mike Alsup wrote: > > > You could create a new selector shortcut for that case like this: > > > jQuery.expr[':'].lastx = function(a,i,m,r){return i>=r.length-m[3];}; >
[jQuery] How can the selector match the last 2 selected element.
The selector can match last one elememt by using ":last", but how about last n elements?Are there some simple way to do this?