This time I will share jQuery Plugin and tutorial about jQuery Plugin To Handle & Manage HTML5 Desktop Notifications – Push Notification, hope it will help you in programming stack.
Push Notification is a jQuery plugin that makes used of HTML5 Notifications API to create and display desktop notifications with custom titles, messages, icons and callbacks.
How to use it:
1. Load the latest version of jQuery library and the jQuery Push Notification plugin in the html document.
1 |
< script src = "//code.jquery.com/jquery-3.1.0.min.js" ></ script > |
2 |
< script src = "push_notification.js" ></ script > |
2. Create a basic desktop notification.
1 |
$.notify( "simple notify" ); |
3. With a custom title.
1 |
$.notify( "Custom Title" , { |
2 |
title: "This is title!" |
4. Execute a callback function after you click on the notification.
1 |
$.notify( "click alert notify" ).click( function (){ |
5. With a custom notification icon.
1 |
$.notify( "Custom Icons" , { |
This awesome jQuery plugin is developed by asmsuechan. For more Advanced Usages, please check the demo page or visit the official website.