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 16: Line 16:


// hide the content
// hide the content
$('.tabtarget div').hide();
$('.tabtarget .tabcontent').hide();


// select a tab
// select a tab
Line 44: Line 44:
     // onclick event
     // onclick event
     $(this).on( 'click', function() {
     $(this).on( 'click', function() {
       $('#'+target+' div').hide();
       $('#'+target+' .tabcontent').hide();
       $('.tabset[data-tab-target="'+target+'"][data-tab-selector="'+selector+'"] .tab2').removeClass( 'active' );
       $('.tabset[data-tab-target="'+target+'"][data-tab-selector="'+selector+'"] .tab2').removeClass( 'active' );
       $(this).addClass( 'active' );
       $(this).addClass( 'active' );