<div class="inner">
line 1
line 2
line 3
</div>
$(document).ready(function(){
$('.inner').wrapInner('<p/>');
});
The current code adds the the <p>
tag around all the elements, is it possible to add the <p>
to each? like
<p>line 1</p>
<p>line 2</p>
<p>line 3</p>