JQUERY Prepending an LI to an UL with Animation
        Posted  
        
            by nobosh
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by nobosh
        
        
        
        Published on 2010-05-21T14:56:54Z
        Indexed on 
            2010/05/21
            15:01 UTC
        
        
        Read the original article
        Hit count: 494
        
Hello,
I have a UL and I'm working to dynamically add a new LI to the top of the UL with some animation.
I have the following so far which works ok:
$("#container").prepend('<li id="newhere"><input type="checkbox" /><span class="listTitle">Im new here</span><ul></ul></li>').hide().slideDown("slow");
#container is the UL
The problem with the above is that is hides the entire UL and then slides the entire UL down and I just want the NEW LI that was prepended to animate.
Ideas? thxs
© Stack Overflow or respective owner