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];}; > > > And then use it like this: > > > var lastTwoDivs = $('div:lastx(2)'); > > You could also just use the slice() method :-) > > $('div').slice(-2); > > --Karl > > ____________ > Karl Swedbergwww.englishrules.comwww.learningjquery.com