User:Locke/common.js: Difference between revisions

Want an adless experience? Log in or Create an account.
no edit summary
mNo edit summary
No edit summary
Line 38: Line 38:
     // check default
     // check default
     if( $(this).data( 'tabDefault' ) ) {
     if( $(this).data( 'tabDefault' ) ) {
      $(this).addClass( 'active' );
       tabselect( target, selector, selection );
       tabselect( target, selector, selection );
     }
     }
Line 44: Line 45:
     $(this).on( 'click', function() {
     $(this).on( 'click', function() {
       $('#'+target+' div').hide();
       $('#'+target+' div').hide();
      $('.tabset[data-tab-target="'+target+'"][data-tab-selector="'+selector'"] .tab2').removeClass( 'active' );
      $(this).addClass( 'active' );
       tabselect( target, selector, selection );
       tabselect( target, selector, selection );
     });
     });