First thing to do is to edit file:
templates/gk_university/js/gk.scripts.js
and add at its end:
- Code: Select all
jQuery(document).ready(function() {
jQuery(window).scroll(function() {
var currentPosition = jQuery(window).scrollTop();
var scrollSize = 100;
if ( currentPosition >= scrollSize && !jQuery('#gkHeaderNav').hasClass('active') ) {
jQuery('#gkHeaderNav').addClass('active');
} else if ( currentPosition < scrollSize && jQuery('#gkHeaderNav').hasClass('active') ) {
jQuery('#gkHeaderNav').removeClass('active');
}
});
});
What the code does - it checks how much user have scrolled down, and if the scroll pixel value is larger than 100 - it adds additional class to #gkHeaderNav element so we can use it in css.
Modify 100 value to suit your needs after whole setup is finished.