You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
962 B
JavaScript
28 lines
962 B
JavaScript
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
const openNotificationsBtn = document.getElementById("openNotificationsSideBar");
|
|
const closeNotificationsBtn = document.getElementById("closeNotificationsSideBar");
|
|
const notificationsSideBar = document.getElementById("notificationsSideBar");
|
|
|
|
function openNotifications() {
|
|
notificationsSideBar.classList.remove('slide-out');
|
|
notificationsSideBar.classList.add('slide-in');
|
|
document.body.classList.add("overflow-hidden");
|
|
}
|
|
|
|
function closeNotifications() {
|
|
notificationsSideBar.classList.remove('slide-in');
|
|
notificationsSideBar.classList.add('slide-out');
|
|
document.body.classList.remove("overflow-hidden");
|
|
}
|
|
|
|
openNotificationsBtn.addEventListener("click", function () {
|
|
openNotifications();
|
|
});
|
|
|
|
closeNotificationsBtn.addEventListener("click", function () {
|
|
closeNotifications();
|
|
});
|
|
});
|
|
|