I need to add HTML Tags in a precise position using Javascript
<div id="myId">
<div id="addAfter"><div>
<***here I need to add a set off HTML Tags***>
<div ><div>
<div><div>
</div>
javascript code
var ol = '<ol id ="div_blue"><li><img id="blueUp" src="<c:url value="/resources/style/images/btup.png"/>" alt =""/></li><li>....</li>< /ol>' ;
$("#myId").InsertInPosition2(ol);
but how to define InsertInPosition2?
thanks
imprim ecran
Use .after()
Demo: Fiddle
If you want to add the element with reference to the parent element then
Demo: Fiddle