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'; | |
}); |
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'); | |
// Get the MaterialStepper instance of element. | |
var Stepper = stepperElement.MaterialStepper; | |
// Select any step. | |
var step = element.querySelector('.mdl-step'); | |
step.addEventListener('onstepnext', function (event) { | |
// When the step (this) action button/link with [data-stepper-next] attribute is clicked | |
// you can do some condition to advances and error or do anything else. |
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
<li class="mdl-step"> | |
<!-- label --> | |
<!-- content --> | |
<div class="mdl-step__actions"> | |
<!-- continue button --> | |
<!-- cancel button --> | |
<!-- back button (optionally) --> | |
<!-- skip button (optionally) --> | |
</div> | |
</li> |
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
<li class="mdl-step"> | |
<!-- label --> | |
<div class="mdl-step__content"> | |
</div> | |
<!-- actions --> | |
</li> |
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
<li class="mdl-step"> | |
<span class="mdl-step__label"> | |
<span class="mdl-step__title"> | |
<span class="mdl-step__title-text">Name of step 1</span> | |
<span class="mdl-step__title-message">Summarize if needed</span> | |
</span> | |
</span> | |
<!-- content --> | |
<!-- actions --> | |
</li> |
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
<ul class="mdl-stepper"> | |
<li class="mdl-step"></li> | |
<li class="mdl-step"></li> | |
<li class="mdl-step"></li> | |
</ul> |
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
<html> | |
this is a test | |
</html> |
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
.step-content > * | |
{ | |
display: none; | |
} |