Ive got this script:
$(function(){
$(".submenu li:even").addClass("oddrow");
});
It works great – but it continues to stripe through all the submenus…
How do i contain it, so it starts again at the start of each submenu
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.
You could use a context to restrict the selection (i imagine you have various
<ul>that contains your<li>) so that you iterate over the<ul>and then select only the even<li>of that<ul>