Jquery中文网 www.jquerycn.cn
Jquery中文网 >  jQuery  >  jQuery 插件  >  正文 jQuery Touch

jQuery Touch

发布时间:2014-06-24   编辑:www.jquerycn.cn
This plugin adds Apple iPod/iPhone (firmware 2.0+) touch functionality to jQuery. Use built in Touch methods including ontouchstart, ontouchend, ontouchmove, ongesturestart, ongesturechange and ongestureend. You may specify what options you want available
This plugin adds Apple iPod/iPhone (firmware 2.0+) touch functionality to jquery. Use built in Touch methods including ontouchstart, ontouchend, ontouchmove, ongesturestart, ongesturechange and ongestureend. You may specify what options you want available for the specified target(s), including: animate, dragx, dragy, rotate, resort and scale. Written By: Peter Schmalfeldt ( Manifest Interactive ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INFORMATION: animate: (optional bool | default true) Simulates the Apple Touch Flick gesture and allows an item to be thrown. Speed is automatically determined. dragx: (optional bool | default true) Allows dragging along the X axis. Using only one axis locks the dragging to that axis. Setting both axis' to true will allow you to drag in any direction. dragy: (optional bool | default true) Allows dragging along the Y axis. Using only one axis locks the dragging to that axis. Setting both axis' to true will allow you to drag in any direction. rotate: (optional bool | default false) Allow the element to be rotated. resort: (optional bool | default true) Set the z-index of the current element on top of the others ontouchstart. scale: (optional bool | default false) Allow the element to be scaled. NOTE: This is only functional an the Apple iPod/iPhone running version 2.0+. Elements also need to have a unique ID in order for jQuery Touch to communicate correctly. Also, I am currently working on the ability to allow for a "sticky" element. This will soon allow you to apply this plugin to a scrolling text box and be able to scroll its entirety without having the content just move to wherever your finger is located. SAMPLE USAGE:   $('.myclass').touch({
    animate: true,
    sticky: false,
    dragx: true,
    dragy: true,
    rotate: true,
    resort: true,
    scale: true
});     $('#myelement').touch({
    animate: false,
    sticky: false,
    dragx: true,
    dragy: true,
    rotate: false,
    resort: true,
    scale: false
});  

您可能感兴趣的文章:
Touch Gallery
jQuery Touch
jQuery Multi Level horizontal CSS Menu
jQuery Touchwipe
jSuggest
最佳6款用于移动网站开发的jQuery 图片滑块插件小结
shell中的&&与
JSONP 跨域访问代理API-yahooapis实现代码
bash shell循环创建多个文件的小脚本
shell判断文件是否存在(模板)的一段代码

[关闭]