I need help in adding an element at a particular location in the page body.
Here is my page code.
<div id="div1>
<label id="label1"></label>
<input type="text1"></input>
<!-- Insert button here -->
<span id="span1"></span>
</div>
I want to add a button at the location where I have put a comment above using jQuery. If the page syntax is fixed, is there a way I can add an element as a third child of the parent div? I do not want to put placeholders and do a string replace.
Thanks.
jsFiddle example.