What should be simple tab select...

What should be simple tab select...

I'm feeling utterly stupid that I cannot resolve my simple tab switchers located to the right-hand side of my page. Ordering it into the correct order, somewhat working then not then again... I keep going round in circles and it should be simple.

  • On click - Users OR Alerts
    • Remove all active classes
    • Set active class on clicked
  • On click - More
    • Set active class WITHOUT toggling any others.
    • Show drop menu
      • Select Option
        • Remove all active classes
        • Set active class on clicked & 'MORE' 
      • Click outside / Other tab
        • Remove active class on More
        • Hide drop down.


JQuery Code
  1. $('.Quick-Sidebar .nav-tabs li').click(function(e) {
  2. if (!$(this).hasClass('active')) {
  3. if (!$(this).hasClass('dropdown')) {
  4. $('.Quick-Sidebar .nav-tabs li').removeClass('active');
  5. $(this).addClass('active');
  6. }
  7. }
  8. if ($(this).hasClass('dropdown')) {
  9. $(this).toggleClass('active');
  10. $('.dropdown-menu').toggle();
  11. }
  12. });