Skip to content
Loading
  
  •     
  •   
  •     
  •   
  •         class="products">Products  
  •     
  •   
  •   
  • +2
  • Jignesh Kumar
    +2
    Hi Rohan,
     
    Please try this one,
    https://www.tutorialrepublic.com/codelab.php?topic=faq&file=bootstrap-keep-last-selected-tab-active-on-page-refresh 
    +2
  • Sachin Singh
    +1
    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. });    
    +1
  • +1
    Sir I have check your code but there is two active at once with same colour,
    +1
  • Muhammad Imran Ansari
    +1
    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; }
    +1
  • +1
    Sachin sir after reload tab colour not stable .
    +1
  • Sachin Singh
    +1
    see, i created the fiddle please test
    https://jsfiddle.net/sachinsinghsharpencode/yf0opt1w/1/ 
    +1