Hello everyone,
I have some bookmarks in my page with buttons linking to them, they are defined by a class name which makes a smooth scroll navigating to bookmark. I'm using this piece of javascript:
$(".smooth-scroll").click(function() {
var onwardId = $(this).attr("href");
$("html, body").animate({
scrollTop: $(onwardId).offset().top
}, "slow");
return false;
});
But, silverstripe changes my href="#bookmark" buttons to href="baseurl/section/page.html#bookmark" so my script doesn't recognize the bookmark and navigating to bookmark has no smooth scroll effect.
How can I stop SS to do that change? is there any modifications I should do to make the script work?
Thanks in advance.