Menu
Index
Let's study
jQuery
Programming!
jQuery.com
CHAPTER1
CHAPTER2
CHAPTER3
CHAPTER4
CHAPTER5
CHAPTER6
CHAPTER7
CHAPTER8
CHAPTER9
CHAPTER10
Index
>
Chapter7
>
sample09.html
子孫要素を取得する find()メソッド
HTML
CSS
JavaScript
jQuery
find()は、子孫要素を取得するメソッドです。
jQuery Code
$(function() { $("#list")
.find("a")
.addClass("icon"); });
jQuery.com 公式ドキュメント
.find()
« All Samples
« Prev
Next »
Chapter 7
sample01.html
ひとつ前の要素を取得する prev()メソッド
sample02.html
ひとつ後ろの要素を取得する next()メソッド
sample03.html
前の兄要素を全て取得する prevAll()メソッド
sample04.html
後ろの弟要素を全て取得する nextAll()メソッド
sample05.html
prevAll、nextAllは、セレクタを指定することもできる!
sample06.html
親要素を取得する parent()メソッド
sample07.html
子要素を取得する children()メソッド
sample08.html
祖先にさかのぼって取得する parents()メソッド
sample09.html
子孫要素を取得する find()メソッド
sample10.html
1番最初の要素/最後の要素 first()/last()メソッド
sample11.html
n番目の要素を取得する eq()メソッド