April 9, 2013
Append without last element
Joesandeek’s Questions:
<div id="container">
<div class="sub">a</div>
<span id="add">add</span>
</div>
$('#add').click(function(){
$('#container').append('<div class="sub">a</div>');
})
This append element to #container on bottom. How can i add this element on bottom without last element(#add)? I would like have always #add on bottom.
Fiddle: http://jsfiddle.net/nk67d/