With my template occurs this error on this menu:
https://sandkiste.flute.at/werkstatt.html (as well as on subpages)
Uncaught TypeError: $.scrollTo is not a function
at originalScrollTo (common.js:9)
at a.fn.init.$.fn.scroll (common.js:25)
at HTMLDocument.<anonymous> (werkstatt.html:878)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.K (jquery.min.js:2)
originalScrollTo @ common.js:9
$.fn.scroll @ common.js:25
(anonymous) @ werkstatt.html:878
i @ jquery.min.js:2
fireWith @ jquery.min.js:2
ready @ jquery.min.js:2
K @ jquery.min.js:2
I've added this script to the bottom of my index.php:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('body').prepend('<a href="#" class="back-to-top btn no-btn btn-sm hidden-sm hidden-xs"><i class="fa fa-arrow-circle-up" aria-hidden="true"></i>Back to Top</a>');
var amountScrolled = 200;
jQuery(window).scroll(function() {
if ( jQuery(window).scrollTop() > amountScrolled ) {
jQuery('a.back-to-top').fadeIn('slow');
} else {
jQuery('a.back-to-top').fadeOut('slow');
}
});
jQuery('a.back-to-top, a.simple-back-to-top').click(function() {
jQuery('html, body').animate({
scrollTop: 0
}, 700);
return false;
});
});
</script>
The error only occurs in Google Chrome.
Can you give me some help to solve this issue? Thank you!