I want to use a variable in a string. I have tried to do it many times, but it is only getting the variable name.
<script type="text/javascript"> $(function(){ $("a").click(function(){ var id= $(".id").html(); $('.html').html("<div class='new' id='"+id+"'>jitender</div>"); }) })