Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery wrap inner text

$("button").click(function(){
  $("p").wrapInner("<b></b>");
});

/*
Before:
<p>Hello World!</p>

After:
<p><b>Hello World!</b></p>
*/
 
PREVIOUS NEXT
Tagged: #jquery #wrap #text
ADD COMMENT
Topic
Name
2+1 =