slide menu

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Apr 17, 2013 7:06 am
Reply with quote
Report this post
I have different backgrounds to different menu items (inageBg, imagebga etc.). Now I want the same menu slider effect as on the home page. But then on all pages.

If you scroll down and the above menu disappears. Then suddenly a different menu at the top of appears that stays above (same effect as the home page).

Where should I change something to get the same effect on all pages?

thanks
User avatar
Junior Boarder

Konrad M
Wed Apr 17, 2013 8:42 am
Reply with quote
Report this post
Hi,
you need to edit js/gk.scripts.js file
User avatar

GK User
Wed Apr 17, 2013 8:50 am
Reply with quote
Report this post
Thanks.

I already Figured that out. But what should I change in the file?
User avatar
Junior Boarder

Konrad M
Wed Apr 17, 2013 8:53 am
Reply with quote
Report this post
Please find:
Code: Select all
if(page_loaded && document.getElement('body').hasClass('imageBg'))

and change it to:
Code: Select all
if(page_loaded && (document.getElement('body').hasClass('imageBg') II document.getElement('body').hasClass(your_suffix_1') II document.getElement('body').hasClass('your_suffix_2')))
User avatar

GK User
Wed Apr 17, 2013 1:44 pm
Reply with quote
Report this post
thnx...

But if I replace the code I get a syntax error ... Is the code below right?
User avatar
Junior Boarder

Konrad M
Wed Apr 17, 2013 2:34 pm
Reply with quote
Report this post
Sorry, my mistake try this one:
Code: Select all
if(page_loaded && (document.getElement('body').hasClass('imageBg') || document.getElement('body').hasClass(your_suffix_1') || document.getElement('body').hasClass('your_suffix_2')))
User avatar

GK User
Wed Apr 17, 2013 4:06 pm
Reply with quote
Report this post
the code is good. But it is not working yet. Must i do somthing with:

Code: Select all
if(!document.getElement('body').hasClass('imageBg')) {
      document.id('gkHeaderNav').inject(document.id('gkMenuWrap'), 'inside');
      document.id('gkHeader').setProperty('class', 'gkNoMenu');
      document.id('gkHeader').getElement('div').setStyle('display', 'none');
      document.id('gkMenuWrap').setProperty('class', 'active');   
   }


Change in:
Code: Select all
   if(!document.getElement('body').hasClass('imageBg') ||
   !document.getElement('body').hasClass('imageBga') ||
   !document.getElement('body').hasClass('imageBgb')) {
      document.id('gkHeaderNav').inject(document.id('gkMenuWrap'), 'inside');
      document.id('gkHeader').setProperty('class', 'gkNoMenu');
      document.id('gkHeader').getElement('div').setStyle('display', 'none');
      document.id('gkMenuWrap').setProperty('class', 'active');   
   }


If I do this, it still does not work
User avatar
Junior Boarder

Konrad M
Thu Apr 18, 2013 3:29 pm
Reply with quote
Report this post
Try change to this one:
Code: Select all
  if(!document.getElement('body').hasClass('imageBg') &&
   !document.getElement('body').hasClass('imageBga') &&
   !document.getElement('body').hasClass('imageBgb')) {
      document.id('gkHeaderNav').inject(document.id('gkMenuWrap'), 'inside');
      document.id('gkHeader').setProperty('class', 'gkNoMenu');
      document.id('gkHeader').getElement('div').setStyle('display', 'none');
      document.id('gkMenuWrap').setProperty('class', 'active');   
   }
User avatar

GK User
Thu Apr 18, 2013 4:30 pm
Reply with quote
Report this post
that did the trick... thnx
User avatar
Junior Boarder


cron