Mouse Wheel Event

Source: Internet
Author: User

Onepaege-scroll the mouse wheel event processing in the source code

function (Event) {//dommousescroll:ff,mozmosuepixelscroll: Old Ff,mousewheel: Other browser event.preventdefault ();//block default behavior, For example, when the browser window has scroll bar, prevent scroll bar default scrolling?  var delta = Event.originalEvent.wheelDelta | | -event.originalevent.detail;//detail:+-3, FF,wheeldelta:+-120, other browsers  
if(!$ ("Body"). Hasclass ("Disabled-onepage-scroll")) Init_scroll (event, Delta);
});
if (Settings.keyboard = True) {$ (document). KeyDown (function (e) {V Ar tag = e.target.tagname.tolowercase ();//ie e.target can fetch a value?        ----Well find incompatible IE9 below ..... if (!$ ("Body"). Hasclass ("Disabled-onepage-scroll")) {switch (E.which) {case 38:if (tag            ! = ' input ' && tag! = ' textarea ') el.moveup () break;            Case 40:IF (Tag! = ' input ' && tag! = ' textarea ') el.movedown () break;            Case in://pageg up if (tag! = ' input ' && tag! = ' textarea ') el.moveup () break;            Case://page dwn if (tag! = ' input ' && tag! = ' textarea ') el.movedown () break;            Case://home El.moveto (1);            Break            Case://end El.moveto (total);            Break          Default:return;    }        }      }); }

  

Mouse Wheel Event

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.