Skip to content

atom2ueki/notify.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notify.js

a modern browser notification alert library


License

Install

<script src="notify.js" charset="utf-8"></script>

Usage

var options = {
  title: "customized title",
  dir: "rtl",
  body: "customized notification",
  timeout: 1000,
  icon: 'images/bell-icon.png',
};
var notify = new notify(options);
/* the order need use callback */
var test = notify.show();

Default Options

var defaults = {
  title: 'default title', // String
  dir: 'ltr', // String
  body: 'default notification', // String
  icon: 'images/bell-icon.png', // String, path to the icon image
  timeout: 2000 // int
};

OnClick Event

trigger something when click the notification

notify.show('onclick', function(){
  alert("Trigger Something after click the notification");
});

About

a modern browser notification alert library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published