Anchor links after updating to v3.16. Translate aside 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
Sun Mar 08, 2015 12:36 pm
Reply with quote
Report this post
Hi

I apologize for my poor english, I just speak spanish.

I wanted to ask two questions about the aside menu
1. After updating to 3.16 version, anchors links on the same page make a nice animation but links to anchor on different pages with absolute path have stopped working.
2. How can I use different multilanguage menus on aside menu? it does not appear in any module. Maybe using just one menu with all multilanguage links?

Thank You
User avatar
Fresh Boarder

teitbite
Sun Mar 08, 2015 10:29 pm
Reply with quote
Report this post
Hi

1. Need to see Your site to say something about this problem.
2. You can create copies of template style and select a different menu for them. Than You will be able to attach this template styles to different languages.
User avatar
Moderator

GK User
Sun Mar 08, 2015 10:50 pm
Reply with quote
Report this post
Hi

It is not yet published, may I send you a private message with URL and an administrator account?
User avatar
Fresh Boarder

teitbite
Mon Mar 09, 2015 9:45 am
Reply with quote
Report this post
Hi

Its just a guess, but I've noticed that using links like:

/como-funciona/#buscar-paradas instead of what there is there now works. So please try add this "/" before hash. Let me know if this makes a difference.
User avatar
Moderator

GK User
Mon Mar 09, 2015 10:41 am
Reply with quote
Report this post
Hi,

Well I have tried adding /# but still not working
User avatar
Fresh Boarder

GK User
Mon Mar 09, 2015 7:35 pm
Reply with quote
Report this post
Maybe editing this code on line 49 of /templates/gk_mo/js/gk.scripts.js ? how?

Code: Select all
if(jQuery(document.body).attr('data-smoothscroll') == '1') {
      // smooth anchor scrolling
      jQuery('a[href*="#"]').on('click', function (e) {
          e.preventDefault();
          if(this.hash !== '') {
              if(this.hash !== '' && this.href.replace(this.hash, '') == window.location.href.replace(window.location.hash, '')) {
                  var target = jQuery(this.hash);
                  if(target.length && this.hash !== '#') {
                      jQuery('html, body').stop().animate({
                          'scrollTop': target.offset().top
                      }, 1000, 'swing', function () {
                          if(this.hash !== '#') {
                              window.location.hash = target.selector;
                          }
                      });
                  }
              }
          }
      });
User avatar
Fresh Boarder

GK User
Mon Mar 09, 2015 8:05 pm
Reply with quote
Report this post
Well, comenting or deleting that code anchors to other pages works but we lose smooth animation
User avatar
Fresh Boarder

teitbite
Tue Mar 10, 2015 10:05 pm
Reply with quote
Report this post
Hi

Here is an old smooth scrolling script. Try using it instead:

Code: Select all
   jQuery('a[href^="#"]').on('click',function (e) {
      e.preventDefault();

      var target = this.hash,
      target = jQuery(target);
      if(this.hash !== '') {
         jQuery('html, body').stop().animate({
            'scrollTop': target.offset().top
         }, 1000, 'swing', function () {
            window.location.hash = target.selector;
         });
      }
   });
User avatar
Moderator


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