I have an issue with JS - "hide menu on Scroll Down, Show on Scroll Up" and its optimalization on Safari.
The menu works on all browsers except Safari where it disappears on the top because of the top bounce.
Here is the JS code:
var lastPosition = 0;
$(document).ready(function(){
$(window).on('scroll', function(){
$('header').toggleClass('hide', $(window).scrollTop() > lastPosition);
lastPosition = $(window).scrollTop();
});
I dont want fixed menu I would be glad to hear any suggestions.
Thank you very much,
Barbora