have any idea for this?
example code:
&开发者_C百科lt;td>
<div class="translate">
<p><span>Hello world</span></p>
<p><strong>hellow <span>there</span></strong</p>
</div>
</td>
the output should be
<td>
<div class="">
<pclass="translate"><span class="translate">Hello world</span></p>
<p class="translate"><strong class="translate">hellow <span class="translate">there</span></strong</p>
</div>
</td>
$(".translate").removeClass("translate").children().addClass("translate");
$("p.translate").removeClass("translate").children().addClass("whatever");
精彩评论