Keep menu stuck at the top on all pages and homepage

GK User
Sat Apr 01, 2017 3:46 am
Does anyone know how to keep the menu at the top all the time instead of scrolling half way down the page then the menu appears. Please see my site. I checked in override.css and didn't see anything. Thank you.

https://www.marine.usf.edu/50-years/
User avatar
Fresh Boarder

Joshua M
Mon Apr 03, 2017 11:07 pm
Hi,

Try to edit your gk_events/js/gk_scripts.js file and change this fragment:

Code: Select all
if(jQuery('#gkHeaderNav').length > 0 && !jQuery('#gkHeaderNav').hasClass('active')) {      
      jQuery(window).scroll(function() {
         var currentPosition = jQuery(window).scrollTop();

         if(
            currentPosition >= jQuery('#gkHeader').outerHeight() &&
            !jQuery('#gkHeaderNav').hasClass('active')
         ) {
            jQuery('#gkHeaderNav').addClass('active');
         } else if(
            currentPosition < jQuery('#gkHeader').outerHeight() &&
            jQuery('#gkHeaderNav').hasClass('active')
         ) {
            jQuery('#gkHeaderNav').removeClass('active');
         }
      });
   }

into:
Code: Select all
if(jQuery('#gkHeaderNav').length > 0 ) {      
      jQuery('#gkHeaderNav').addClass('active');
   }
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.