droctoganapus86
New Member
- Messages
- 49
- Reaction score
- 0
- Points
- 0
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 :
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
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');
});