1var newDiv = $('<div>My new div</div>'); //create Div Element w/ jquery
2$( "#someOtherElement" ).append(newDiv); //append new div somewhere
1<div class="container">
2 <h2>Greetings</h2>
3 <div class="inner">Hello</div>
4 <div class="inner">Goodbye</div>
5</div>
6<script>$( "<p>Test</p>" ).insertAfter( ".inner" );</script>
1$('#box').append(
2 $('<div/>')
3 .attr("id", "newDiv1")
4 .addClass("newDiv purple bloated")
5 .append("<span/>")
6 .text("hello world")
7);