Say for example I have a body with the class "test" and I want to take that class and add it to another div, how can I do this with jQuery? Thanks Edit: ...
How to clone content of the element with class and put it into itself? Here is example. We have this:
<div class="cloneThis">one</div> <div class="cloneThis">two</div>
<div class="cloneThis">one<span>one</span></div> <div class="cloneThis">two<span>two</span></div>
I write a simple function to clone a field: Online Demo: http://jsfiddle.net/5yVPg/
<div id="main"> <a id="add-input" href="#">+ add</a> ...