nav and notification fixes
This commit is contained in:
@@ -84,6 +84,7 @@ $(function() {
|
||||
function open_navigation() {
|
||||
window.timetable_can_scroll = false;
|
||||
window.navigation_is_open = true;
|
||||
$body.removeClass('notification_open');
|
||||
|
||||
$navigation.one(window.transitionend, function() {
|
||||
window.requestAnimationFrame(function() {
|
||||
|
||||
13
private/js/modules/notifications.js
Normal file
13
private/js/modules/notifications.js
Normal file
@@ -0,0 +1,13 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
|
||||
$body.on('click', '.header__button--notification', function(event) {
|
||||
event.preventDefault();
|
||||
$body.toggleClass('notification_open');
|
||||
});
|
||||
|
||||
$body.on('click', '.notification__close', function(event) {
|
||||
event.preventDefault();
|
||||
$body.removeClass('notification_open');
|
||||
});
|
||||
});
|
||||
@@ -19,6 +19,7 @@ $(function() {
|
||||
if (!window.navigation_is_open) {
|
||||
if (activated) {
|
||||
if ($(window).scrollTop() < $(window).height() * 0.05 && window.timetable_can_scroll) {
|
||||
$body.removeClass('notification_open');
|
||||
window.prevent_scroll_calc = true;
|
||||
$timetable.attr('data-active', 0);
|
||||
$timetable.removeClass('active');
|
||||
@@ -26,6 +27,7 @@ $(function() {
|
||||
}
|
||||
} else {
|
||||
if ($(window).scrollTop() > $(window).height() * 0.05 && window.timetable_can_scroll) {
|
||||
$body.removeClass('notification_open');
|
||||
init_timetable_items();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user