开发者

How to control mouse scroll default value javascript

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜