This time I will share jQuery Plugin and tutorial about Clean Toast-like Alert Messages In jQuery – kk-message, hope it will help you in programming stack.
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.
1 |
< script src = "/path/to/jquery.min.js" ></ script > |
2 |
< script src = "/path/to/jquery-kk-message/message.js" ></ script > |
2. Create a Success notification.
1 |
kkMessgae.success( 'This is a SUCCESS message' ); |
3. Create a Warning notification.
1 |
kkMessgae.warning( 'This is a WARNING message' ); |
4. Create an Error notification.
1 |
kkMessgae.error( 'This is an ERROR message' ); |
5. Create a loading indicator with custom loading text & a loading spinner.
1 |
kkMessgae.loading( 'Loading...' ); |
6. To config the notification messages, override the parameters at the beginning of the message.js
as follows:
This awesome jQuery plugin is developed by viyongyong. For more Advanced Usages, please check the demo page or visit the official website.