how do i select only 3rd( or some other no. of my chioce) li element with jquery?
for ex:
how do i change the background of only third li with jquery. any help please
how do i select only 3rd( or some other no. of my chioce) li
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the
eqmethod like this:Or you can use this variation of
:eqfilter selector:The indexing starts from
0, you need to specify2to actually select the thirdliIf however you want to select every third element, you need to use
nth-childlike this:The index for
nth-childstarts from1though.