Menu ribbon in mobile view
-
Hello,
Is it meant to be that menu ribbon disappeares is mobile view when i scroll down the page? In computer screen the ribbon stay in place even when im scrolling.
Have a nice day!
Viewing 3 replies - 1 through 3 (of 3 total)
-
Hi! Yes, in mobile view the header isn’t ‘sticky’.
But is there easy way how ta make it “sticky”?
You could open
../assets/js/myscripts.jsand replace:// Sticky Menu function sticky_menu() { var nav = $('.menu-wrap'); nav_scrolled = false; spo_scrooled = false; if( !nav.hasClass('sticky-disabled') ) { if( $(window).width() > 1140 ) { $(window).scroll(function () { if (220 <= $(window).scrollTop() && !nav_scrolled && $(window).width() > 1140) { if( $('body').hasClass('admin-bar') ) { nav.removeAttr('style').addClass('visible').css('top', 28); } else { nav.removeAttr('style').addClass('visible') } nav_scrolled = true; } if (220 >= $(window).scrollTop() && nav_scrolled) { if( $('body').hasClass('admin-bar') ) { nav.removeClass('visible').css('top', 0); } else { nav.removeClass('visible'); } nav_scrolled = false; } if (320 <= $(window).scrollTop() && !spo_scrooled) { $('.header-social-icons').css('display', 'block').animate({'marginRight': 0}, 100); spo_scrooled = true; } if (320 >= $(window).scrollTop() && spo_scrooled) { $('.header-social-icons').animate({ 'marginRight': 20 }, 100, function() { $('.header-social-icons').hide().css({ 'marginRight': 0 }); }).show(); spo_scrooled = false; } }); } else { $('.menu-wrap').removeClass('visible'), nav_scrolled = false, $('.header-social-icons').removeAttr('style'), spo_scrooled = false; } } } sticky_menu(); if( $('body').hasClass('admin-bar') ) { $('.visible').css('top', 100); }with:
// Sticky Menu function sticky_menu() { var nav = $('.menu-wrap'); nav_scrolled = false; spo_scrooled = false; if( !nav.hasClass('sticky-disabled') ) { $(window).scroll(function () { if (220 <= $(window).scrollTop() && !nav_scrolled) { if( $('body').hasClass('admin-bar') ) { nav.removeAttr('style').addClass('visible').css('top', 28); } else { nav.removeAttr('style').addClass('visible') } nav_scrolled = true; } if (220 >= $(window).scrollTop() && nav_scrolled) { if( $('body').hasClass('admin-bar') ) { nav.removeClass('visible').css('top', 0); } else { nav.removeClass('visible'); } nav_scrolled = false; } if (320 <= $(window).scrollTop() && !spo_scrooled) { $('.header-social-icons').css('display', 'block').animate({'marginRight': 0}, 100); spo_scrooled = true; } if (320 >= $(window).scrollTop() && spo_scrooled) { $('.header-social-icons').animate({ 'marginRight': 20 }, 100, function() { $('.header-social-icons').hide().css({ 'marginRight': 0 }); }).show(); spo_scrooled = false; } }); } } } sticky_menu(); if( $('body').hasClass('admin-bar') ) { $('.visible').css('top', 100); }I don’t know if it will work 100%. I must tell you that I am not responsible for any issues in mobile view.
If you would like custom work done you can try:
http://jobs.wordpress.net/
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Menu ribbon in mobile view’ is closed to new replies.
