Smooth scroll link

Posted in: Newspaper
Post count: 10

hi guys, i have added a ID link to a Div ID at the bottom of the page, i would like it it to smooth scroll down to to the DIV ID. If i add the JS to the page or to a separate JS file it breaks the <div class=”td-scroll-up</div> or the menu open option on the mobile version.

the code i used that worked, but break other things was:

$(document).ready(function(){
$(‘.tdm-image-box’).on(‘click’, function(event) {
event.preventDefault();
var hash = this.hash;
$(‘html, body’).animate({scrollTop: $(hash).offset().top}, 800);
});
})

do you have anything in your functions that already includes this and allows me to do this without breaking anything?

Post count: 23312

Hello jonathan24,

Notice that our theme has the Smart Sidebar functionality as you can read in our documentation from here -> https://forum.tagdiv.com/smart-sidebar-2/ Regarding the mobile version, we do not have any such an option for smooth scroll, sorry! At the mobile version, the Sidebar does not exist.

Thanks for your understanding!

Post count: 10

hi there Catalin, understanding bott, but i’m sorry not understanding what smooth scroll has to do with the Smart Sidebar functionality.. i just mean a normal href link e.g at the top of the page that can smooth scroll down to further down the same page.

Post count: 10

*both

Post count: 20688

Hi,

To what element did you anchor the link? If to a menu item, see this topic
https://forum.tagdiv.com/topic/one-page-site/
Or this one where a link defined in the page content will smooth scroll to a set class in the same page
https://forum.tagdiv.com/topic/smooth-scrolling-html-menu/

Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.