I’ve my mark up as
<div id="wrap">
<div class="clickhere"></div>
<div class="clickhere"></div>
<div class="clickhere"></div>
<div class="clickhere"></div>
<div class="clickhere"></div>
</div>
Now, I want to add another <div class="clickhere"></div> just after the div clicked using jQuery. I thought of .append() or .prepend() but it only adds at the last or the first of the parent element (if applied at the parent element).
$('.clickhere').click(function(){
// add <div class="clickhere"></div> just below $(this)
})
You have
.insertAfter()for that 🙂