Skip to content

ahNotification.js is a javascript library that provides simple, lightweight, stylish, responsive and functional/interactable notifications.

License

Notifications You must be signed in to change notification settings

ahmadhayyan/ahnotification.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ahNotification.js

ahNotification version ahNotification only 6 KB ahNotification demo ahNotification license

ahNotification.js is a javascript library that provides simple, lightweight, stylish, responsive and functional/interactable notifications.

4 Different Types Custom Interactable Button Support CSS/HTML Tag
ahNotification.js ahNotification.js ahNotification.js

Table of Contents

How to Install

Important! Put this inside body element.

<script id="ahNotification" src="https://rawcdn.githack.com/ahmadhayyan/ahnotification.js/v1.0.0/ahNotification.min.js" integrity="sha384-YN4GV5ZWZ9ZuLdXVbZhdCT8AIyx9NBuYNn0taXRTZ1A03fnx+ZSt7SE46GPgihNq" crossorigin="anonymous"></script>

Or download here, but don't forget to add the id when you import the script.

How to Use

popupNotification(type, text, button, function);
  • type (string) = "Info", "Success", "Warnings", "Error".
  • text (string) is any information you want to show the user.
  • button (boolean) = true, false.
  • function (string) is a function you want to run when user click confirm on the button.

Examples

popupNotification("Info", "An informative messages");
popupNotification("Warnings", "Remove user Henry?", true, "removeUser('Henry')");

Demo

Check out the demo at ahnotification.js.org

Copyright and License

Copyright © Ahmad Hayyan. ahNotification.js is released under the MIT License.