I am using ascensor.js on my website and I have a problem with jquery function scrollTop - it's doesn't work. I've tried different options but it still nothing happens. How to fix that?
// EDIT
Sorry. Here is the code.
I am using this simply function.
<a id="scrolltop"></a>
$(function () {
$('#scrolltop').click(function () {
$('html, body').animate({
scrollTop: '0px'
},
1500);
return false;
});
});
Now when I was included the ascensor.js it's just stopped working anymore.
The one you have tried is normal jquery way, you are not using ascensor.js. Here is the both version and you can see the difference -
Below is the body code, where for temporary I have used fixed 1000px to see scroll effect.
When you click on jquery-version thats not using ascensor and moves slowly as you are using animation. The other version is ascensor which by default do scroll top. The detail documentation and implementation example can give you other capabilities to move in any direction animation.