[jQuery] Re: jQuery selector that matches dd's elements [SOLVED]

2008-10-13 Thread Mauricio (Maujor) Samy Silva
@Paperboy: Sorry, both solutions you pointed out selects ALL dd after the dt clicked. Tks! @Karl: The plugin you pointed out do the job. Tks! MaurĂ­cio

[jQuery] Re: jQuery selector that matches dd's elements [SOLVED]

2008-10-13 Thread ricardobeat
Already solved but I thought it would be fun to solve it by hand :D jQuery.fn.getDDs = function(){ var next = $(this[this.length-1]).next(); if(next.is('dd')){ return this.add(next).getDDs(); } else { return this.not('dt'); }; }; this is a bit faster: jQuery.fn.getDDs =