I am appending div in existing div and then one more div into append div but it not work for me. what am I doing wrong. please help
<head>
<script type="text/javascript">
$(function(){
$('a').click(function(){
var cl=$('#free').clone();
var jj=$('.append')
var mm=jj.append('<div class="hii"></div>')
mm.append(cl)
})
})
</script>
</head>
<body>
<div style="background:#F00; width:500px; height:50px" id="free"></div>
<a href="#">hide</a>
<div class="append"></div>
</body>
jj.append('<div class="hii"></div>')returnjj, not new div. So use this: