Last active
June 12, 2016 09:17
-
-
Save axdemelas/f3489660ccea7cf0b225 to your computer and use it in GitHub Desktop.
Basic usage of stepper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Select your stepper element. | |
var stepperElement = document.querySelector('ul.mdl-stepper'); | |
var Stepper; | |
// Check if MDL Component Handler is loaded. | |
if (typeof componentHandler !== 'undefined') { | |
// Get the MaterialStepper instance of element to control it. | |
Stepper = stepperElement.MaterialStepper; | |
// Moves the stepper to the next step for test. | |
Stepper.next(); | |
} else { | |
// Material Design Lite javascript is not loaded or for another | |
// reason MDL Component Handler is not available globally and | |
// you can't use (register and upgrade) Stepper component at this point. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment