I have 5 sublinks which have 2 states; hover (CSS className: subLinks
) and active (CSS ClassName: subLinksClicked
)
I call the following function on page ready;
$(document).ready(function(){
if (navigator.userAgent.match(/iPad/i) != null)
{
$("#leftNav a.subLinks").live("hover",function(){
$("#leftNav a.subLinks").removeClass("subLinksClicked");
$(this).addClass("subLinksClick");
clickEvent($(this));
});
}
}
Now there is an issue on the iPad...Basically on click of each of the sub links there is an AJAX call, which kind of removes all of these links and then rewrites as part of response..And for some reason, after that, if I click on another sublink, the active class does not get removed from the previous link..
I expect this to happen, as I have used jQuery.live() and not just jQuery.bind()
Please help me. Thank you.