======jQuery :first-child Selector====== * description : jQuery :first-child Selector * author : 오션 * email : shlim@repia.com * lastupdate : 2021-06-02 \\ ====The source of this article==== [[https://www.w3schools.com/jquery/sel_firstchild.asp|jQuery :first-child Selector]]\\ ====Example==== 부모 요소의 첫 번째 자식인 모든 %%

%% 요소를 선택합니다.\\

The first paragraph in body.

The first paragraph in div.

The last paragraph in div.


This is a span element.

The first paragraph in another div.

The last paragraph in another div.

The last paragraph in body.

=====Definition and Usage===== **%%:first-child%%** 선택자는 부모의 첫 번째 자식인 모든 요소들을 ​​선택합니다.\\ \\ **Tip:** **%%:last-child%%** 선택자를 사용하여 부모의 마지막 자식 요소들을 선택합니다.\\ =====Syntax===== $(":first-child") ====Example==== 모든 %%
%%요소들의 첫 번째 %%

%% 요소를 선택합니다.

The first paragraph in body.

The first paragraph in div.

The last paragraph in div.


The first paragraph in another div.

The last paragraph in another div.

The last paragraph in body.

====Example==== **%%:first%%**와 **%%:first-child%%**의 차이점\\

The first paragraph in div.

The last paragraph in div.


The first paragraph in another div.

The last paragraph in another div.

====Example==== FIXME **%%:first%%**, **%%:first-child%%**, **%%:first-of-type%%** 의 차이점\\

The first paragraph in body, and the first child in div.

The first paragraph in div, and the first child in div.

The last paragraph in div, and the last child in div.


This is a span element, and the first child in this div.

The first paragraph in another div, and the second child in this div.

The last paragraph in another div, and the third child in this div.

This is a span element, and the last child in this div.

The first paragraph in another div, and the first child in this div.

The last paragraph in the another div, and the last child in this div.


The last paragraph in body, and the last child in div.



{{tag>오션 jQuery :first-child Selector}}