I am creating a tab control using Ul and Divs. Ul is used to display the tab heads. When the user selects one Tab (ie , ‘Li’) ,the tab back color get changed with respect to others.
I want to get the Selected and not selected li in that Ul .
I used
$(".tab li:selected").css("background-color","red");
$(".tab li:deselected").css("background-color","white");
It ‘s not working, I know the code does not work .just guess it.
Now may you understood my problem,right?
When your user selects a tab, add a class to that tab that represents this:
Then, in your CSS, you can style it as necessary.