开发者

How to control mouse scroll default value javascript

开发者 https://www.devze.com 2023-03-30 04:59 出处:网络
Hey guys How to control mouse middle button.. I want to override mouse wheel for ex开发者_JAVA百科ample when I clicked wheel button..The browser is scrolling default value(I guess 112 ) but I want 200

Hey guys How to control mouse middle button.. I want to override mouse wheel for ex开发者_JAVA百科ample when I clicked wheel button..The browser is scrolling default value(I guess 112 ) but I want 200

How can I do that Sorry about my english


You have to attach a event handler to scroll event of the window and set the scrollTop value. But I don't understand why would you like to do this.

$(window).scroll(function(){
   $(this).scrollTop(200);
});

Demo

0

精彩评论

暂无评论...
验证码 换一张
取 消