various fixes
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
|
||||
var cookie_name = 'last_notification_update';
|
||||
var last_notification = getCookie(cookie_name);
|
||||
|
||||
var $header_button_notification = $('.header__button--notification');
|
||||
var current_notification = $header_button_notification.attr('data-updated');
|
||||
|
||||
if (last_notification !== current_notification) {
|
||||
$header_button_notification.addClass('new');
|
||||
}
|
||||
|
||||
$body.on('click', '.header__button--notification', function(event) {
|
||||
event.preventDefault();
|
||||
setCookie(cookie_name, current_notification, 90);
|
||||
$(this).removeClass('new');
|
||||
$body.toggleClass('notification_open');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user