$("#div1").click(function () { var $div = $("<div/>") .attr("id", "div2") .html("new div"); $(this).append($div); });
<div id="div1">HELLO</div>