Add a New Div with Jquery


Sometimes you may want to add a div without editing the actual html file. You can do this by using this neat little snippet in Jquery.

[code language=”javascript”]
$(‘#parent-div-to-add-new-div-to’).append(‘<div class="hiding" id="new-child-div">Content here</div>’);
[/code]

Tags: ,