A completely different option is to write your code in reverse:

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

In this case, the slideDown will effect the last element in the
todoList (the one you just added). Just something to consider :-)

--John

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/
>

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

Reply via email to