Hi guys
I want to add a back to top button in a couple of places on a page. I used the follwoing code but it doesn’t work:
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery(window).scroll(function () {
if (jQuery(this).scrollTop() > 800) {
jQuery('.scrollup').fadeIn(1000);
} else {
jQuery('.scrollup').fadeOut(1000);
}
});
jQuery('.scrollup').click(function () {
jQuery("html, body").animate({
scrollTop: 0
}, 600);
return false;
});
});
</script>
The codes does not work when using Woodmart. There is no smooth scroll top the top.
Can you tell me if there’s a conflict somewhere with the Theme? I have used this code many times and it always works.
Thanks