Skip to content

Instantly share code, notes, and snippets.

@IrregularShed
Created February 21, 2017 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IrregularShed/f2d1fdd59f21d8b998ece01833785c0a to your computer and use it in GitHub Desktop.
Save IrregularShed/f2d1fdd59f21d8b998ece01833785c0a to your computer and use it in GitHub Desktop.
a = document.querySelector('#tabset .mdl-tabs__tab-bar a[is-active]:not(.is-active)');
if (a) a.classList.add('is-active');
b = document.querySelector('#tabset .mdl-tabs__panel[is-active]:not(.is-active)');
if (b) b.classList.add('is-active');
@IrregularShed
Copy link
Author

Will probably need to handle the flipped version - removing the class from .is-active:not([is-active])

@IrregularShed
Copy link
Author

this is in conjunction with only showing the tabs when there's a full set of details to populate with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment