I have html structured like so.
<div id='container'> <div class='item'> ... </div> <div class='item'> ... </div> <div class='item'> ... </div> ... <div id='item_final'><input type="button" id='addOne'>...</div> </div>
and what I am trying to do it add another item to the container class before the item_final div. The items are dynamic, so the number of them is unkown.
$('#container div:last').before( $('<div>') );
1.4m articles
1.4m replys
5 comments
57.0k users