Tickets › Tickets › Roneous › Sticky menu comes to late › Reply To: Sticky menu comes to late
September 5, 2019 at 6:56 am
#8396
Supporter
Hi there,
Thanks for writing in!
To resolve this issue, please open up the scripts.js file in themes/roneous/assets/js folder, find the tlg_update_nav() function, in around line 541 – 567, and change it into this:
function tlg_update_nav() {
if (jQuery(window).width() > 990) {
var tlg_section = tlg_nav.hasClass('transparent') ? parseInt(tlg_first_section_height) - parseInt(wp_data.navian_menu_height) : parseInt(tlg_first_section_height) + parseInt(wp_data.navian_menu_height);
if (tlg_top_offset <= 0) {
if (tlg_nav_fixed) { tlg_nav_fixed = false; tlg_nav.removeClass('fixed nav-show'); }
return;
}
if (tlg_top_offset > tlg_section) {
// do nothing
} else {
if (tlg_top_offset > tlg_nav_height) {
if (!tlg_nav_fixed) { tlg_nav_fixed = true; tlg_nav.addClass('fixed nav-show'); }
} else {
if (tlg_nav_fixed) { tlg_nav_fixed = false; tlg_nav.removeClass('fixed nav-show'); }
}
}
}
if (jQuery(window).width() <= 990) {
if (!tlg_nav_fixed) { tlg_nav_fixed = true; tlg_nav.addClass('fixed nav-show'); }
}
}
P.S: Please remember to hard refresh or clear the browser cache after the changes.
Hope this helps,
Danny
