html 桌面拖动效果,HTML5+jQuery实现支持桌面和移动拖动iPhone风格插件

当我们为Web创造的东西,现在它是非常重要的,我们还记得网络已经从触摸板鼠标蔓延到触摸屏。有时候这是很难适应的,但经过不断努力创造一些真棒交叉设备友好的触摸和拖动!现在让我们用HTML5+jQuery实现支持桌面和移动拖动iPhone风格插件。

115333hky0bmzblb3ve0z2.jpg

代码:

$(document).ready(function() {

$('.content').dragSensitive({

// The length of every row. Default is 10 items per row

rowLength : 10,

// The default width of the box.

boxWidth : 660,

// The default height of the box.

boxHeight : 500,

// The rate at which grabbing pans across items

// The default is 1.3. Increasing makes it go slower.

rate : 1.3,

// Sets whether or not the UI will snap to the last

// element when the user stops grabbing

round : true,

// This amount a user can drag (in pixels) while still

// being able to click an object. Usually clicking is

// disabled on drag, but within a (by default) 20px movement

// clicking will still be enabled

mistake : 20

});

});

声明:本文原创发布php中文网,转载请注明出处,感谢您的尊重!如有疑问,请联系admin@php.cn处理

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值