Uncaught TypeError: $(...).once is not a function
JS Code:
(function($){Drupal.behaviors.backtotop={attach:function(context,settings){var exist=$('#backtotop').length;if(exist==0)$("body",context).once('backtotop').each(function(){$('body').append("<button id='backtotop'>"+settings.back_to_top.back_to_top_button_text+"</button>");});backToTop();$(window).scroll(function(){backToTop();});$('#backtotop',context).once('backtotop').each(function(){$(this).click(function(){$("html, body").bind("scroll mousedown DOMMouseScroll mousewheel keyup",function(){$('html, body').stop();});$('html,body').animate({scrollTop:0},350,'linear',function(){$("html, body").unbind("scroll mousedown DOMMouseScroll mousewheel keyup");});return false;});});function backToTop(){if($(window).scrollTop()>settings.back_to_top.back_to_top_button_trigger)$('#backtotop').fadeIn();else $('#backtotop').fadeOut();}}};})(jQuery);;
Neuen Kommentar schreiben