Skip to content
Loading
Colour Change active tab.  
  •     
  •   
  •   
  • Jignesh Kumar
    Hi Rohan,
     
    Please try this one,
    https://www.tutorialrepublic.com/codelab.php?topic=faq&file=bootstrap-keep-last-selected-tab-active-on-page-refresh 
  • Sachin Singh
    see, i created the fiddle please test
    https://jsfiddle.net/sachinsinghsharpencode/yf0opt1w/1/ 
  • Sachin sir after reload tab colour not stable .
  • Muhammad Imran Ansari
    If you are using jQuery UI tabs, you can style the currently selected tab by applying your styles to the class
    .ui-tabs .ui-tabs-active { background-color: green; }
  • Sir I have check your code but there is two active at once with same colour,
  • Sachin Singh
    1. .active    
    2. {    
    3. color: green;    
    4. }    
    5.     
    6. $('#div ul li > a').click(function() {    
    7.     $('li').removeClass('active');    
    8.     $(this).parent().addClass('active');    
    9. });