I have an anchor with class .anchor in my page.
Now what i want to do is that I want to add .anchor element in html like :
var html='';
var html += '<header><ul><li>' + $('.anchor ').get(0) + '</li></ul></header>';
this should produce below html...
<header><ul><li><a href="any url" attribute="value" attribute1="value1" class="anchor ">inner text / html</a></li></ul></header>
I am using this, becoause I dont want to use append/prepend etc again and again. I will use approprite jquery function at the end. So I am using adding content in string. But it is not working. Please suggest.