我需要用跨度将文本包装在 div 中。
<div class="item">
<span class="count"></span>
Text that needs to be wrapped.
</div>
<div class="item">
<span class="count"></span>
Text that needs to be wrapped.
</div>
<div class="item">
<span class="count"></span>
Text that needs to be wrapped.
</div>
试过这个,但它并没有真正起作用......
$('.item').text().wrap('<span class="new" />');