Also try this, it will just take the last div.sidebarToDo _inside_
#todoList.

$('#todoList > div.sidebarToDo:last');



On 2/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hello,

I have a main div, with id= "todoList", and within it, a number of DIVs,
all with classes "sidebarToDo".  Let's say I have just added a DIV to the
DOM ...

$('#todoList').append('<div class="sidebarToDo"
width="100%">Hello</div>');

How do I now get a reference to this last DIV with class
"sidebarToDo"?  Notice it doesn't have an ID, but it is the last one in the
master todoList DIV.

Thanks so much.  This discussion group is excellent. - Dave


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/




--
Joan Piedra || Frontend webdeveloper
http://joanpiedra.com/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to