android toast x - Free Download Tiny Android Toast Message Plugin - jQuery Toastx

Free Download Tiny Android Toast Message Plugin – jQuery Toastx

Posted on

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.

android toast x - Free Download Tiny Android Toast Message Plugin - jQuery Toastx
File Size: 3.78 KB
Views Total: 776
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

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.

1 $(function(){
2   $.toastx('Toast Message Here');
3 });
4  
5 // or
6 $.toast({
7   'message': 'Toast Message Here'
8 }).show();

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’.

1 $.toast({
2   'message': 'Toast Message Here',
3   'appendToCtxSel': '#myContainer'
4 }).show();

5. Set the time to wait before dismissing the toast message. Default: 4000ms.

1 $.toast({
2   'message':'Toast Message Here',
3   'durationTime': 5000
4 }).show();

6. Set the top & left position of the toast message.

1 $.toast({
2   'message': 'Toast Message Here',
3   'left': null,
4   'top': null
5 }).show();

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

source : jquery.net