To use the flash notifications, add the following lines inside the <head>
tag of your HTML:
<link rel="stylesheet" href="notify.css">
<script src="notify.js"></script>
Use the flash
object to show different types of notifications:
flash.error(message, position, duration, closeButton);
flash.success(message, position, duration, closeButton);
flash.info(message, position, duration, closeButton);
flash.warning(message, position, duration, closeButton);
Top Left Error:
flash.error('Something went wrong!', 'top-left');
Top Center Success with Close Button:
flash.success('Operation Successful!', 'top-center', 5000, true);
Bottom Right Info with Custom Duration:
flash.info('This is an info message', 'bottom-right', 1000);