1.0.1 • Published 10 years ago

jnotice v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

JNotice

Great Javascript notification in the browser

Getting started

  1. npm install jnotice your project or download archive
  2. Include JNotice.js, JNotice.css and JNotice-animate.css
  3. Create instance JNotice with your options
  4. Add the object to the notification
  5. Call JNotice at the right time
<script>
   var jnotice = new JNotice();
   jnotice.add({html: 'Hello world JNotice!', duration: 3000});
   jnotice.call();
</script>

Instance options

Notification object options

Public methods

add - Add notification in storage. It may be an object or an array of objects. call - Call added notification getStorage - Get the current storage clearStorage - Clear the current storage dismissAll - Hide all shown now notification destroy - remove container and all notification

Events

show - Moment show the notification hide - Moment hide the notification. event.hideIsUser - will help to identify hide user or system timer

Browsers support

Chrome, FF, Opera, Safari, IE9+

Example

See example - JNotice