I have a list:
<li> one </li>
<li> two </li>
<li> three </li>
how can i call out a specific element in the list to apply a style to? for example: how can i call “two” can apply a style to it.
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.
$('li:eq(1)');is the jQuery selector for the second element (note: zero based index). If you want to use a variable for the element number, then use something like @Soufiane$('li').eq(num);in CSS you can try
li + liand you’ll get IE7+ support.