3
jQueryでラッパーを追加するには「含むタグを持たないもの」を選択するにはどうすればよいですか?例:div内の迷いのあるテキストを折り返す
<div class="post">
<div class="whatever">This should remain untouched</div>
I want to wrap this in div.red
</div>
結果は、あなたがテキストノードを選択しようとしている。この
<div class="post">
<div class="whatever">This should remain untouched</div>
<div class="red">I want to wrap this in div.red</div>
</div>
100ちょうど華麗この(fiddle)を試してみてください。 –
ニースの答え、ありがとう! – Duopixel