jQuery wrap elements – wrapinner()

.wrapinner() method is used to wrap the inner child contents of each matched element (including text nodes) with an HTML structure. The below example we Selects all paragraphs and wraps a bold tag around each of its contents.

$(document).ready(function(){
$(“p”).wrapInner(““);
});

 

Share this nice post:

2 thoughts on “jQuery wrap elements – wrapinner()

Comments are closed.