Non-obtrusive Toast Notification Plugin - jQuery NToastJS

File Size: 10.7 KB
Views Total: 1697
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Non-obtrusive Toast Notification Plugin - jQuery NToastJS

An Android-inspired toast notification plugin for jQuery.

The toast plugin provides a Javascript method to display a non-obtrusive message on the top of the page.

It's often helpful to notify visitors about events such as submitting a form, leaving a comment etc. Usually this is done through an ugly flash or as a pop up. However by using the toast notification plugin for jQuery you can offer spiffy notifications without any of the above mentioned limitations and your site will look awesome!

Features:

  • Gradient background.
  • Bottom countdown bar.
  • Auto dismiss.
  • Custom icons.

How to use it:

1. Load the latest jQuery library and the NToastJS plugin's files in the document.

<!-- jQuery -->
<script src="/path/to/cdn/jquery.slim.min.js"></script>

<!-- NToast plugin files -->
<link rel="stylesheet" href="/path/to/NToast.min.css">
<script src="/path/to/NToast.min.js"></script>

2. Create a new NToastJS instance and pass the following parameters:

  • background: Background color. The BLUR option is used to determine if use the gradient background
  • position: TR - TOP RIGHT | TL - TOP LEFT | BR - BOTTOM RIGHT | BL - BOTTOM LEFT
  • toastMessage: Your own toast message
  • showIcon: Determine whether to use icons
  • iconClass: Icon class(es)
  • showProgress: Determine whether to show a countdown bar at the bottom of the toast message
  • autoDismissTime: Time to wait before auto dismissing the toast message
/* 
  NToast(
   background,
   position,
   toastMessage,
   showIcon,
   iconClass,
   showProgress,
   autoDismissTime,
  )
/*
NToast(
  "#5060DC blur",
  "tl",
  "Welcome To NToastJs!",
  true,
  "fa fa-bell",
  true,
  100,
)

Changelog:

2021-11-30

About Author:

Author: nodo-shanidze

Website: https://nshanidze.github.io/NToastJS/


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