Menu on scroll

WordPress theme dedicated to start-up websites with amazing CSS3 animated icons, price tables and parallax effect background.
GK User
Tue Feb 10, 2015 6:06 pm
Hi,

i've got a question. Is it possible to change the menu behaviour to make it visible after scroll down even when i am on the header image? (like creativity theme, for example)

Thanks for help
User avatar
Fresh Boarder

GK User
Wed Feb 11, 2015 8:44 am
User avatar
Moderator

GK User
Wed Feb 11, 2015 9:20 am
Hi,

thanks for the response. With the portion of code you mentioned, the menu doesn't show at all, even after the header!
User avatar
Fresh Boarder

GK User
Wed Feb 11, 2015 12:37 pm
Nevermind, i've found how to resolve this.

But i've got another question: is it possible to add divider lines between menu elements or a sort o grid?

Thanks
User avatar
Fresh Boarder

GK User
Thu Feb 12, 2015 8:20 am
Hi, could you share the solution? It may be helpful fo other users.

Regarding the divider/grid - it's unfortunately not possibe, but in the first level of the menu you can add i.e. border or pseudoelements:before, but probably it's not that what you want..
User avatar
Moderator

GK User
Thu Feb 12, 2015 4:17 pm
I've changed the portion

Code: Select all
if (jQuery(window).scrollTop() > headerHeight && !jQuery('#gk-menu-wrap').hasClass('active')) {

                //document.id('gkHeaderNav').inject(document.id('gkMenuWrap'), 'inside');

                jQuery('#gk-menu-wrap').append(jQuery('#gk-header-nav'));

                jQuery('#gk-head').attr('class', 'gk-no-menu');

                // hide

                jQuery('#gk-menu-wrap').attr('class', 'active');

            }

            //

            if (jQuery(window).scrollTop() <= headerHeight && jQuery('#gk-menu-wrap').hasClass('active')) {

                jQuery('#gk-head > div').first().css('display', 'block');

                jQuery('#gk-head > div').first().prepend(jQuery('#gk-header-nav'));

                jQuery('#gk-head').attr('class', '');

                jQuery('#gk-menu-wrap').attr('class', '');


to

Code: Select all
// if menu is not displayed now

            if (jQuery(window).scrollTop() > 50 && !jQuery('#gk-menu-wrap').hasClass('active')) {

                //document.id('gkHeaderNav').inject(document.id('gkMenuWrap'), 'inside');

                jQuery('#gk-menu-wrap').append(jQuery('#gk-header-nav'));

                jQuery('#gk-head').attr('class', 'gk-no-menu');

                // hide

                jQuery('#gk-menu-wrap').attr('class', 'active');

            }

            //

            if (jQuery(window).scrollTop() <= 50 && jQuery('#gk-menu-wrap').hasClass('active')) {

                jQuery('#gk-head > div').first().css('display', 'block');

                jQuery('#gk-head > div').first().prepend(jQuery('#gk-header-nav'));

                jQuery('#gk-head').attr('class', '');

                jQuery('#gk-menu-wrap').attr('class', '');
User avatar
Fresh Boarder


cron