This time I will share jQuery Plugin and tutorial about Tiny Android Toast Message Plugin – jQuery Toastx, hope it will help you in programming stack.
Toastx is an ultra-light jQuery toaster plugin to show Android-style toast messages that auto dismiss after a certain timeout with a smooth fade animation.
See Also:
How to use it:
1. To use this plugin, include the JavaScript jquery.toastx.js
after loading jQuery JavaScript library.
1 |
< script src = "/path/to/jquery.min.js" ></ script > |
2 |
< script src = "/path/to/jquery.toastx.js" ></ script > |
2. The JavaScript to show a toast message on the screen.
2 |
$.toastx( 'Toast Message Here' ); |
7 |
'message' : 'Toast Message Here' |
3. HTML content is supported as well.
1 |
$.toast({ 'message' : '<i class="far fa-bell"></i> Toast Message Here' }).show(); |
4. Determine the container the toast message should append to. Default: ‘body’.
2 |
'message' : 'Toast Message Here' , |
3 |
'appendToCtxSel' : '#myContainer' |
5. Set the time to wait before dismissing the toast message. Default: 4000ms.
2 |
'message' : 'Toast Message Here' , |
6. Set the top & left position of the toast message.
2 |
'message' : 'Toast Message Here' , |
This awesome jQuery plugin is developed by ciyuanchild. For more Advanced Usages, please check the demo page or visit the official website.