User:Locke/common.js: Difference between revisions

Want an adless experience? Log in or Create an account.
m
add debug logging
(do away with tabstate, instead walk the DOM to find selections)
m (add debug logging)
Line 71: Line 71:
   // show the selected content
   // show the selected content
   var selectors = Object.keys( selections ).map( function( s ) {
   var selectors = Object.keys( selections ).map( function( s ) {
console.log(s, selections[s]);
     return '[data-tab-content-' + s + '="' + selections[ s ] + '"]';
     return '[data-tab-content-' + s + '="' + selections[ s ] + '"]';
   } );
   } );
console.log(selectors.join(''));
   container.find( '.zdw-tabcontent' + selectors.join( '' ) ).show();
   container.find( '.zdw-tabcontent' + selectors.join( '' ) ).show();
} );
} );
} );
} );