Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 648 Bytes

README.md

File metadata and controls

41 lines (31 loc) · 648 Bytes

Snackbars

Material Vanilla Snackbars (Html, CSS and Javascript)

Show message:

snackbar.show("Hello");

Hide message:

snackbar.hide();

Message after a certain time:

snackbar.timer("Hello", 3000);

Message with button:

// Function example callback
function test(){
  console.info("Cancel button touch!");
}

// Create new button
var button = {};
button.id = "btn_cancel";
button.title = "Cancel";

// Set function callback
snackbar.setCallback(test);

// Call
snackbar.timer("Hello World", 3000, button);

Observations:

  • If your project already uses reset.css, remove the file