I am trying to have a native-like tab bar for a mobile web application.
I have a fixed menu list that changes the page content on the same page and I would like to have the menu items instantly change highlighted state when tapped but am finding some lag on removing the previously selected item.
The :active
and :focus
and .active
all have the same appearance.
My change menu item script:
$(".nav li").click(function(e){
$(".nav li").removeClass("active");
$(this).addClass("active");
//do other functions...
})