This tutorial enables you to remove the smooth scrolling effects from the front page widgets in Digital Pro. Based on this question from a client:
When I click on the buttons on the front-page widgets, the whole page is scrolling to the next section. When I click on the navigation on the top right it’s jumping to the section. Would it be possible to have the same effect?
The Solution
If you look inside the js/front-page.js file in Digital Pro, you’ll find some jQuery for scrolling effects between lines 41 – 59.
You can remove or comment out this jQuery.
$( '.front-page-1 a[href*=#]:not([href=#])' ).click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $( '[name=' + this.hash.slice(1) + ']' );
if (target.length) {
$( 'html,body' ).animate({
scrollTop: target.offset().top
}, 750 );
return false;
}
}
});
When you click the button in the front page 1 widget area, it should work the same as the nav menu links without the smooth scrolling.
Why did the scroll links stop working?
Was this helpful?
Thanks for your feedback!


Leave a Reply
You must be logged in to post a comment.