star Bemat Admin Exclusive Premium Plugin

Snackbars provide lightweight feedback about an operation by showing a brief message at the bottom of the screen. Snackbars can contain an action.

Usage

Show only one snackbar on screen at a time.

Initializing

For performance reasons, the Snackbars are opt-in, meaning you must initialize them yourself.

$(function () {
	$.snackbar();
});

Examples:

JAVASCRIPT Code:

$(function () {
	$("#btntest-snackbar1").on("click",function(){
		$.snackbar("add",{
			type: 		"success",
			msg: 		"Message sent",
			buttonText: "Close",
		});
	});
	$("#btntest-snackbar2").on("click",function(){
		$.snackbar("add",{
			type: 		"info",
			msg: 		"Marked as read",
			buttonText: "Undo",
		});
	});
	$("#btntest-snackbar3").on("click",function(){
		$.snackbar("add",{
			type: 		"warning",
			msg: 		"This item already has the label 'travel'. You can add a new label.",
			buttonText: "Close",
			disappearTime: 10000,
		});
	});
	$("#btntest-snackbar4").on("click",function(){
		$.snackbar("add",{
			type: 		"danger",
			msg: 		"Connection timed out. Showing limited messages.",
			buttonText: "Close",
		});
	});
});