I am trying to make a script with jquery. The function is to add an additional <li> to an <ul>
I have lots of <ul>'s, and i want to target a specific one. How is the best way to do this?
I have this (simpliefied) html. The target <ul> is the one coming right after the "links" div
and this code :Code:<div class="clear"> <div class="links"> <button type="button" class="makecomment">Comment</button> </div> <ul> <li class="arrow"> </li> <li class="comment"></li> </ul> </div> ... and that a couple o'times
Code:$('button.makecomment').click(function(){ $('<li class="comment"></li>').hide().appendTo('').fadeIn('slow'); });


LinkBack URL
About LinkBacks
Reply With Quote
