Why the menu does not switch to the main?

Good evening colleagues.

Please help me to understand. Why this page - https://www.hyundai-24.ru/prices/ menu does not switch to the main? Head is broken)
March 19th 20 at 08:53
3 answers
March 19th 20 at 08:55
Solution
Does not work because you have a script for scrolling the page
Alexander, what exactly should be removed? - jacey commented on March 19th 20 at 08:58
March 19th 20 at 08:57
Solution
then in custom.js
//navigation
$('.navigation').onePageNav({
 begin: function() {
console.log('start');
},
 end: function() {
console.log('stop');
},
 scrollOffset: 0
 });

a plugin is called from jquery.nav.js where there is the following code:
handleClick: function(e) {
 var self = this;
 var $link = $(e.currentTarget);
 var $parent = $link.parent();
 var newLoc = '#' + self.getHash($link);

 if(!$parent.hasClass(self.config.currentClass)) {
 //Start callback
 if(self.config.begin) {
self.config.begin();
}

 //Change the highlighted nav item
 self.adjustNav(self, $parent);

 //Removing the auto-adjust on scroll
self.unbindInterval();

 //Scroll to the correct position
 $.scrollTo(newLoc, self.config.scrollSpeed, {
 axis: 'y',
 easing: self.config.easing,
 offset: {
 top: -self.config.scrollOffset
},
 onAfter: function() {
 //Do we need to change the hash?
 if(self.config.changeHash) {
 window.location.hash = newLoc;
}

 //Add the auto-adjust on scroll back in
self.bindInterval();

 //End callback
 if(self.config.end) {
self.config.end();
}
}
});
}

e.preventDefault();
 }

e.preventDefault() and removes the default behavior of the element, i.e. in your case the link.
mom - jacey commented on March 19th 20 at 09:00
March 19th 20 at 08:59
custom.js remove as I understand it and everything will work?
can replace
//navigation
$('.navigation').onePageNav({
 begin: function() {
console.log('start');
},
 end: function() {
console.log('stop');
},
 scrollOffset: 0
 });

on
//navigation
/*$('.navigation').onePageNav({
 begin: function() {
console.log('start');
},
 end: function() {
console.log('stop');
},
 scrollOffset: 0
 });*/

then it will run the link, but will not work scroll to contacts - freida35 commented on March 19th 20 at 09:02
@freida35, thank you - jacey commented on March 19th 20 at 09:05
@freida35, custom.js better clean up then. everything works except smooth scrolling . and while it probably may) - jacey commented on March 19th 20 at 09:08

Find more questions by tags HTML