snackbar.js 277 B

123456789
  1. function showSnack(id, texto) {
  2. // Get the snackbar DIV
  3. var x = $("#"+id);
  4. // Add the "show" class to DIV
  5. x.addClass("show");
  6. x.html(texto);
  7. // After 3 seconds, remove the show class from DIV
  8. setTimeout(function(){ x.removeClass("show"); }, 2000);
  9. }