You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To add how to trigger snackbar with JS.
Adapted from docs.min.js. Code as such
//close snackbar on click
$(".snackbar-btn").on("click", function () {
$(this).parent(".snackbar").removeClass("show")
});
//show snackbar on click and auto hide at either after 6000ms or button is click again to show new snackbar
$(".snackbar-toggler").on("click", function () {
var e = $(this).next(".snackbar");
if ($(".snackbar.show").length > 0) {
$(".snackbar.show").removeClass("show").one("webkitTransitionEnd transitionEnd", function () {
e.addClass(function () {
setTimeout(function () {
e.removeClass("show")
}, 6e3);
return "show"
})
})
} else {
e.addClass(function () {
setTimeout(function () {
e.removeClass("show")
}, 6e3);
return "show"
})
}
});
The text was updated successfully, but these errors were encountered:
To add how to trigger snackbar with JS.
Adapted from
docs.min.js
. Code as suchThe text was updated successfully, but these errors were encountered: