我有类似的东西:
<div class="the_notice">
<span class="time"> | 3:48pm</span>
To <strong>2013-03-16_10-56-33</strong> By <strong>XYX</strong>
</div>
Run Code Online (Sandbox Code Playgroud)
结果我想要的东西:
<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>
Run Code Online (Sandbox Code Playgroud)
我怎样才能使用jQuery实现这一目标?请帮助我.
好吧,如果内容总是相同,你可以做类似的事情
$('.the_notice').contents().slice(2).wrapAll('<div class="wrap"/>');
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
69 次 |
| 最近记录: |