Easy Android Style Message Toaster For jQuery - Toast.js

File Size: 5.46 KB
Views Total: 1079
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Easy Android Style Message Toaster For jQuery - Toast.js

Toast.js is an ultra-light and easy to use jQuery plugin to show Android style toast messages with support for auto position, custom dismiss timeout and message queue.

How to use it:

1. Place jQuery JavaScript library and the jQuery toast.js script at the end of the document.

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="toast.js"></script>

2. Initialize the toast plugin.

Toast.init();

3. Show a simple toast message on your webpage.

Toast({
   text: "hello, world"
}).show();

4. Customize your toast messages.

Toast({

  // timeout
  time: 3000,

  // custom text
  text: 'hello, world.',

  // width of the message box
  width: 400,

  // x, y position
  x: 0,
  y: 0,

  // auto position
  autoPos: true,

  // normal, fixedTop, fixedBottom
  type: 'normal' 
  
}).show();

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