Reputation: 25
I want to make a tag in the tag heading, for example:
<h1> example </h1>
I was cold and turn it into the following
<h1> <span> example </span> </h1>
Please help for the code manipulation.
Upvotes: 1
Views: 1641
Reputation: 388406
You can use wrapInner()
$('h1').wrapInner('<span />')
Demo: Fiddle
Upvotes: 6