jQuery日本語リファレンス

jQuery does not mean Japanese Query...

ヌー

Traversing/API/jQuery - Sample Code

contents()

	 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <script src="/jquery/js/jquery.js"></script>
 <script>
 $(document).ready(function(){
 $("p").contents().not("[nodeType=1]").wrap("<b/>");
 });
 </script>
</head>
<body>
<p>ここはテキストノードだが<span>ここはElementなので除外され、</span>ここは対象になる。</p>
</body>
</html>
 
	 
[実行結果] [フレーム]
[contents() の説明へ]
© Copyright 2009 by semooh.jp | Design by Free CSS Templates - Thanks to Dubai Apartments

AltStyle によって変換されたページ (->オリジナル) /