Notifications
Notifications can be used in many places to give users some extra information about the operations they perform. For example, you can have a notification added to the Report a Bug
modal.
<div
class=
"notification is-success is-hidden modal-success-notification"
>
<button
class=
"delete close-notification"
></button>
<span
class=
"fa fa-bug"
></span>
Thanks. Your bug has been reported.</div>
The notification shows up when you click send. So, in order to close the notification, you can click on the close icon inside the notification. To remove the notification you can create an event listener on the close icon using the .close-notifiction
class and remove the notification. Here is the code you will need to add the functionality:
var
closeNotification
=
document
.
querySelectorAll
(
'.close-notification'
);
if
(
closeNotification
.
length
>
0
)
{
closeNotification
.
forEach
(
closeIcon
=>
{
...