Clean Toast-like Alert Messages In jQuery - kk-message
File Size: | 6.93 KB |
---|---|
Views Total: | 872 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
kk-message is a tiny jQuery plugin to create various types of alert notification messages (success, warning, error, and loading) that automatically fade out after a certain timeout just like the Android Toasts.
How to use it:
1. Insert the JavaScript message.js
after jQuery library and we're ready to go.
<script src="/path/to/jquery.min.js"></script> <script src="/path/to/jquery-kk-message/message.js"></script>
2. Create a Success notification.
kkMessgae.success('This is a SUCCESS message');
3. Create a Warning notification.
kkMessgae.warning('This is a WARNING message');
4. Create an Error notification.
kkMessgae.error('This is an ERROR message');
5. Create a loading indicator with custom loading text & a loading spinner.
kkMessgae.loading('Loading...');
6. To config the notification messages, override the parameters at the beginning of the message.js
as follows:
// top offset msgTop: 50, // CSS z-index property zIndex: 12580, // auto dismiss after 3 seconds duration: 3000, // start position starTop: -50,
This awesome jQuery plugin is developed by viyongyong. For more Advanced Usages, please check the demo page or visit the official website.