add an html element after another code example

Example 1: javscript insert element after another

//insert new Element after some reference Element
function insertAfter(newElement, referenceElement) {
    referenceElement.parentNode.insertBefore(newElement, referenceElement.nextSibling);

//example usage
var newElement = document.createElement("div");
    newElement.innerHTML = "my New Div Text";
var myCurrentElement= document.getElementById("myElementID");
    insertAfter(newElement, myCurrentElement);

Example 2: js append html in div after

//Use Jquery
//Include this in your <head>
<script src=""></script>

// This over writes any existing data in the element
// To prevent you can just create a new div under your element

	<div id='<your element id here>'>
		<!--Your Jquery will be rendered here--> 

$('#<your element id here>').html(data);


Misc Example