Is it possible to use anchor smooth scrolling for the inner pages? I use creativity template and all works perfectly, but I have a couple pages with a lot of chapters and I try to use anchor link with smooth scrolling but it's doesn't work. For smooth scrolling I used this jquery script:
- Code: Select all
$('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
}, 1000);
return false;
}
}
});
Thank you for answer