How do I wrap an element's contents in another element in jQuery -
i have simple tag html
<ul> <li>something1</li> <li>something2</li> <li>something3</li> <li>something4</li> </ul>
how make if use jquery?
<ul> <li><a href="#">something1</a></li> <li><a href="#">something2</a></li> <li><a href="#">something3</a></li> <li><a href="#">something4</a></li> </ul>
wich 1-4 defined?
i'd suggest reading through jquery api:
$('li').wrapinner('<a href="#"></a>');
Comments
Post a Comment