User:Locke/common.js: Difference between revisions

Want an adless experience? Log in or Create an account.
fix deactivating tabs for undefined selectors
m (didn't fix it. adding logging)
(fix deactivating tabs for undefined selectors)
Line 48: Line 48:
     } );
     } );


   // activate the tab
   // deactivate other tabs sharing the same selector and activate this one
   tabsets.filter( '[data-tab-selector="' + selector + '"]' ).find( '.zdw-tab' ).removeClass( 'active' );
   tabsets.filter( function() { return $( this ).data( 'tabSelector' ) == selector; } ).find( '.zdw-tab' ).removeClass( 'active' );
   tab.addClass( 'active' );
   tab.addClass( 'active' );