I am adding a css class using jQuery
//Set the css class for tabItem's link
$("#" + menuID + " a").removeClass('navLinkNormal');
$("#" + menuID + " a").addClass('navLinkSelected');
But the colr value is superceded by a a:link and a:visted styles in a different css file. Hence instead of the red color, it is showing black color for the text.
I tried various approaches but din’t work. How can we force to use the red color to the link?
References:
- How to remove a <style> element with jquery?
- Is it possible to remove inline styles with jQuery?
- Styling a:visited links
HTML
<ul id="nav">
<li id="nav_Container" class="tabItem"><a href="javascript:void(0);">Add By Container</a></li>
<li id="nav_WorkLot" class="tabItem"><a href="javascript:void(0);">Add By Worklot</a></li>
<li id="nav_VisualAid" class="tabItem"><a href="javascript:void(0);">Add By Visual Aid</a></li>
</ul>
Style