Last active
June 12, 2016 18:00
-
-
Save axdemelas/cc908b5c2116821cc216 to your computer and use it in GitHub Desktop.
Example of onstepcancel event
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
var stepperElement = document.querySelector('.mdl-stepper'); | |
// Select any step. | |
var step = stepperElement.querySelector('.mdl-step'); | |
step.addEventListener('onstepcancel', function (event) { | |
// When the step (this) action button/link with [data-stepper-cancel] attribute is clicked | |
// you can redirect or do anything else. | |
window.location.href = 'https://mysite.com'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment