I did use the below script that i found on
https://css-tricks.com/snippets/jquery/smooth-scrolling/:
I pasted the script just before the </head> tag in the index.php file of the template and created an anchor and anchor link with JCE. This worked fine for me.
<!-- SMOOTH SCROLL -->
<script src="
https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$(function() {
$('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;
}
}
});
});
</script>
<!-- End of SMOOTH SCROLL -->