1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

JQuery メモ .each()と$each()の違い

Posted at

each()メソッドの書き方例
$('.item').each(function () { / jQueryオブジェクトのループ処理に対して適用される/
});

$each()メソッドの書き方例
$.each(data, function(i, item) { /dataはjQueryオブジェクトではなくただの配列のため$each()を適用
                        iは0から始まる要素のインデックス itemはその要素の値/ @iとitemはindex value elem など任意も文字列でも可
});

/!JQuery最高の教科書 p214 引用!/

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?