:last-of-type セレクタは、その親における特定のタイプの最後の子である全ての要素を選択します。
チップ: これは、:nnth-last-of-type(1) に同じです。
チップ: その親における特定のタイプの最初の子である全ての要素を選択するには、 :first-of-type セレクタを使用します。
$(":last-of-type")
全 <div> 要素の最後の <p> 要素を選択
全 <div> 要素の最後の <p> 要素を選択する方法。
:last、:last-child、:last-of-type の間の違い
:last、:last-child、:last-of-type の間の違いを示します。