How to get the selected item from UL using jQuery?
- by Vibin Jith
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?