various fixes

This commit is contained in:
2018-03-22 21:15:26 +01:00
parent 81dadc6351
commit 858bfaec98
12 changed files with 44 additions and 25 deletions

View File

@@ -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');
});