Tiny Android Toast Message Plugin - jQuery Toastx

File Size: 3.78 KB
Views Total: 891
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Tiny Android Toast Message Plugin - jQuery Toastx

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.

<script src="/path/to/jquery.min.js"></script>
<script src="/path/to/jquery.toastx.js"></script>

2. The JavaScript to show a toast message on the screen.

  $.toastx('Toast Message Here');

// or
  'message': 'Toast Message Here'

3. HTML content is supported as well.

$.toast({'message': '<i class="far fa-bell"></i> Toast Message Here'}).show();

4. Determine the container the toast message should append to. Default: 'body'.

  'message': 'Toast Message Here',
  'appendToCtxSel': '#myContainer'

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

  'message':'Toast Message Here',
  'durationTime': 5000

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

  'message': 'Toast Message Here',
  'left': null,
  'top': null

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