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 |
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.
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.
popupNotification("Info", "An informative messages");
popupNotification("Warnings", "Remove user Henry?", true, "removeUser('Henry')");
Check out the demo at ahnotification.js.org
Copyright © Ahmad Hayyan. ahNotification.js is released under the MIT License.