jQuery :last-childセレクター
定義と使い方
:last-child セレクターは、親要素の最後の子要素を選択します。
ヒント:使用してください:first-childセレクターを使用して、親要素の最初の子要素を選択します。
構文
$(":last-child")
試してみる - 例
すべての <div> 要素の最後の <p> 要素を選択します。
すべての <div> 要素の最後の <p> 要素を選択する方法。
:last と :last-child の違い
:last セレクターと :last-child セレクターの違いを示します。
:last、:last-child、:last-of-type の違い
:last、:last-child、:last-of-type セレクターの違いを示します。
その他の拡張
jQuery セレクター