Easy and Lightweight JavaScript Code for Notifications and Toast in the Browser

MK Notifications is easy to use, JavaScript notifications, for browser notifications and toast. MK Notifications is a JavaScript plugin that can be used in any JavaScript project, allowing you to show off cool notifications and toast.

bs alert plugin, jquery toast message, bootstrap toast slide animation, hide toast message jquery, alert fade out automatically, toast on page load

Features:

  • Font Awesome-based notification icons.
  • Custom X and Y positions.
  • Allows setting the maximum number of notifications to display at a time.
  • 9 built-in themes: Default, Basic, Success, Danger, Warning, Information, Light, Dark, Violet.
  • Supports RTL and LTR.
  • Allows associating notifications.
  • No jQuery (since 2.x) required.

How to make use of it:

1. Include necessary Font Awesome Iconic Font in the webpage.

<link rel="stylesheet" href="/path/to/fontawesome.min.css" />

2. Include the JavaScript and CSS files of the MK Web Notifications extension.

<link href="dist/css/mk-notifications.min.css" rel="stylesheet" />
<script src="dist/js/mk-notifications.min.js"></script>

3. Configure the MK Web Notifications plugin and we are ready to go.

window.addEventListener('load', function() {
  mkNotifications();
});

4. Create a new notification box on the web page.

mkNoti(
  'Notification Title',
  'Notification Body'
);

5. Configure the MK Web Notifications plugin.

mkNotifications({
  positionY: 'right',
  positionX: 'bottom',
  scrollable: true,
  rtl: false, // true = ltr
  max: 5 // number of notifications to display
});

6. Customize the notification box with the following options.

mkNoti(
  'Notification Title',
  'Notification Body', {

    // Default, Primary, Success, Danger, Warning, Info, Light, Dark, Purple
    status: 'default',

    // Custom icon
    icon: {
      class: null,
      color: null,
      background: null
    },

    // Linkify the notification box
    link: {
      url: null,
      target: '_self',
      function: null
    },

    // Is dismissable?
    dismissable: true,

    // Auto dismisses after 7 seconds
    duration: 7000,

    // Callback function
    callback: null,

    // Enable sounds
    sound: false,

    // Custom sound files
    customSound: null,

  }
);

Desktop Notification Style Alert & Toast Message Plugin, MK Notifications Github


See Demo And Download

Official Website(mahkassem): Click Here

This superior jQuery/javascript plugin is developed by mahkassem. For extra Advanced Usages, please go to the official website.

Related Posts

svg-pan-zoom-container

Adding Zoom-on-Wheel and Pan-on-Drag to Inline SVG Elements

Vanilla-js module for adding zoom and panning behavior when dragging to SVG embedded elements. A lightweight Vanilla JavaScript plugin that enables zoom and pan functions on an…

html-table-sortable-js

Sorting HTML Table Vanilla JavaScript Library | Sortable.js

Sortable – Small JS vanilla table sorter makes any table with class = “sortable“, er, sortable. That is, the user can click the table header and change…

WYSIWYG-Rich-Text-Editor

WYSIWYG Rich Text Editor With jQuery And FontAwesome | RichText

RichText jQuery implementation for WYSIWYG Rich Text Editor which uses Font Awesome Iconic Font for editor icons. It is licensed under AGPL-3.0. Initialize editor Simply call .richText() on your jQuery(‘textarea’) or jQuery(‘input’)…

email-domain-autocomplete-genie

[Autocomplete] Email Domain Suggestions Like Gmail, Outlook, or More | email-genie

Email Genie allows auto-completion in the email field by providing a list of domain suggestions (gmail.com, outlook.com, etc.). This package is lightweight, flexible, compatible with libraries (jQuery,…

JavaScript-Library-for-Creating-Squircley-Magic

[Generator] JavaScript Library for Creating Squircley Magic ✨ | squircley.js

squircley.js is the core magic of Squirclular ✨ from https://squircley.app wrapped in a simple 0-dependency JavaScript library. squircley.js can generate SVG files, add square backgrounds to DOM…