当我向下转动鼠标滚轮时,控制台中不断出现Uncaught ReferenceError: sectionScrollTimer is not defined。当用户转动鼠标滚轮时,代码应该会自动从div滚动到div。可能的问题是什么?
if ( jQuery('.dsd_section_to_scroll').length > 0 ) {
jQuery('.dsd_section_to_scroll').first().addClass('active');
jQuery(document).on('whee
我正在使用从下载的JQuery鼠标轮来获取鼠标轮信息。同时,我想要获得滚轮时鼠标的位置。我如何才能做到这一点?
我当前的函数如下:
$(function() {
$('#maindiv').mousewheel(function(event, delta, deltaX, deltaY) {
// somehow obtain mouse position
// Use delta and mouse position for a purpose
});
});