
A lightweight JavaScript library to create sweet, flat-style alert/toast notification popups on the page.
How to use it:
Import the stylesheet ‘notify.css’ and JavaScript ‘notify.js’ into the page.
<link rel="stylesheet" href="notify.css"> <script src="notify.js"></script>
Create an ERROR notification that auto dismisses after 5 seconds.
window.notificationService.notify({
// title
title: 'Error!',
// notification message
text: 'Data failed to save',
// 'success', 'warning', 'error'
type: 'error',
// 'top-right', 'bottom-right', 'top-left', 'bottom-left'
position: 'top-left',
// auto close
autoClose: true,
// 5 seconds
duration: 5000,
// shows close button
showRemoveButton: true
})






