私はこの検索を使用して、 jQueryスクリプトを置き換えています。すべての文字をスパンに入れようとしていますが、Unicode文字では機能しません。
$("body").children().andSelf().contents().each(function(){
if (this.nodeType == 3) {
var $this = $(this);
$this.replaceWith($this.text().replace(/(\w)/g, "<span>$&</span>"));
}
});
ノードタイプを変更する必要がありますか?何によって ?
ありがとう