Changes I make to the classes of a div using jQuery’s .removeClass() do not affect the CSS.
I have this:
<div class="nav active">Menu Item</div>
then I do
$('.nav').removeClass('active');
The CSS for the .active class has a background image. It remains even after this is fired off.
Any suggestions?
I found a workaround for the same issue that I was facing.
You can just change the class attribute.
Example
$('.nav').attr('class','nav');removeClass wont work in iOs, and some mobile devices. This works