cheatsheets/_inactive/deprecated/jquery-mobile-events.md

1.1 KiB

title category
jQuery mobile events JavaScript libraries

Mobile events

For support for tap, swipe, swipeLeft, et al, use jquery.mobile.event.js. Be sure to set $.support.touch first.

To get $.support.touch (and family), use this from jquery.mobile.support.js:

$.extend($.support, {
  orientation: "orientation" in window && "onorientationchange" in window,
  touch: "ontouchend" in document,
  cssTransitions: "WebKitTransitionEvent" in window,
  pushState: "pushState" in history && "replaceState" in history,
  mediaquery: $.mobile.media( "only all" ),
  cssPseudoElement: !!propExists( "content" ),
  touchOverflow: !!propExists( "overflowScrolling" ),
  boxShadow: !!propExists( "boxShadow" ) && !bb,
  scrollTop: ( "pageXOffset" in window || "scrollTop" in document.documentElement || "scrollTop" in fakeBody[ 0 ] ) && !webos && !operamini,
  dynamicBaseTag: baseTagTest()
});