Implementing Material-Design-Lite on my website has caused a conflict with the JQuery button that is meant to scroll back to the top of the page. Despite having both installed, the button fails to function properly when clicked.
<div class='back-to-top'>
<a class='hvr-icon-spin' href='#'/>
</div>
<script>
$(window).scroll(function() {
if($(this).scrollTop() > 200) {
$('#back-to-top').fadeIn();
} else {
$('#back-to-top').fadeOut();
}
});
$('#back-to-top').hide().click(function() {
$('html, body').animate({scrollTop:0}, 600);
return false;
});
</script>
Is there an alternative solution to fix this issue? I have attempted removing JQuery, but the problem persists. You can view the website where I am having trouble here.