I've something like:
<div class="the_notice">
<span class="time"> | 3:48pm</span>
To <strong>2013-03-16_10-56-33</strong> By <strong>XYX</strong>
</div>
In a result I want something like:
<div class="the_notice">
<span class="time"> | 3:48pm</span>
<div class="wrap">
To <strong>2013-03-16_10-56-33</strong> By <strong>XYX</strong>
</div>
</div>
How can I achieve this using jQuery? Please help me on that.
Well if the contents will always be the same, you can do something like
$('.the_notice').contents().slice(2).wrapAll('<div class="wrap"/>');
http://jsfiddle.net/Ysq48/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With