Android Style Snackbar & Toast Plugin - MaterialNotify

File Size: 7.87 KB
Views Total: 486
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Android Style Snackbar & Toast Plugin - MaterialNotify

MaterialNotify is a super tiny jQuery notification plugin designed to create animated top notification bars similar to Android Material Design's snackbars and toasts.

Features:

  • Success & Alert messages.
  • Auto dismiss after a timeout.
  • Bottom progress bar indicating the time left.
  • Trigger a function after timeout.

How to use it:

1. Import jQuery library and the MaterialNotify plugin's files into the HTML document.

<link rel="stylesheet" href="/materialNotify.css" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script  src="/materialNotify.js"></script>

2. Create notification bars using the notify function.

// alert notification
// auto dismiss after 10 seconds
notify("Alert text", 10, true);

// success notification
// auto dismiss after 5 seconds
notify("Success text", 5, false);

3. Trigger a function as soon as the notification bar is dismissed.

notify("Trigger A Function", 10, false, function(){
  // do something
});

Changelog:

2021-04-13


This awesome jQuery plugin is developed by AmirMehr. For more Advanced Usages, please check the demo page or visit the official website.