| Article Introduction: So far , I have written the jquery tutorial has reached the eighth chapter, I do not know if you are still relatively unfamiliar with jquery, if you are still unfamiliar, it doesn't matter. CSS Learning Network in the back of the tutorial left behind the work or case, hope that friends can seriously complete the work of the case. I am sure that you will be able to manage this boisterous well. |
So far , I have written the jquery tutorial has reached the eighth chapter, I do not know if you are still relatively unfamiliar with jquery, if you are still unfamiliar, it doesn't matter. CSS Learning Network in the back of the tutorial left behind the work or case, hope that friends can seriously complete the work of the case. I am sure that you will be able to manage this boisterous well.
This lesson is relatively simple, with four functions.
$ ("Element: Nth-child (index)")
Select the nth child element under the parent, and the index starts at 1, and the EQ function (the EQ function learns later) starts at 0.
┣━:nth-child (even) Even
┣━:nth-child (Odd) Odd
┣━:nth-child (3n) An expression
┣━:nth-child (2) Index
┣━:nth-child (3n+1) An expression
┗━:nth-child (3n+2) An expression
$ ("Element: First-child")
Match the first child element under the parent
$ ("Element: Last-child")
match the last child element under the parent
$ ("Element: Only-child")
matching a unique child element under the parent, such as DT in the DL list, will select DT