LoginSignup
2
6

More than 5 years have passed since last update.

jQueryで知るのは便利と思うメソッド

Last updated at Posted at 2017-12-25

not

指定した要素以外
$("要素").not()

find

指定した要素から、条件に合う子孫要素を探し出す
$("親要素").find("小要素")

next

次の要素を取得
$("要素").next()

nextAll

次以降の要素を取得
$("要素").nextAll()

prev

前の要素を取得
$("要素").prev()

prevAll

前の要素全部を取得
$("要素").prevAll()

siblings

自分以外の兄弟要素を取得
$("要素").siblings()

data

データ属性を取得する
$("要素").data(属性)

参照資料:

jQueryでよく使うメソッド
http://chanmako.com/archives/163
よく使うけど忘れがちな『JavaScript、jQueryのコード』まとめ
https://manablog.org/javascript-code/

2
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
6