惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

博客园 - taodesign

一个自定义分享按钮 解决windows下nginx中文文件名乱码 sublime text 3 添加 javascript 代码片段 ( snippet ) transition动画最简使用方式 sublime text 3 的emmet 添加自定义 html 片段 解决 placeholder 垂直不居中,偏上的问题 Sublime Text 3 配置 sass javascript 进制转换(2进制、8进制、10进制、16进制之间的转换) 解决phpwind 9 转换到 discuz x 3.1的头像仍然不显示问题 sina微博登录框和twitter的比较 PHP初学者必看 不用qq的这一个月 虽然qq的第二封信些的相当中肯,但是—— 从现在起,试着不用qq一个月,看看什么情况 百度兵陷日本,Google 90% Baidu 1% wordpress 侧栏微博插件 Miniposts blogger导入到blogbus非常顺利 ie8 的断字/断行 bug dede vs 帝国
hammerjs jquery的选项使用方法,以给swipe设置threshold和velocity为例
taodesign · 2015-11-17 · via 博客园 - taodesign

先包含hammer.min.js和 jquery.hammer.js,然后:

var $ele = $('#ele'); //复用jquerydom对象,建个变量
$ele.hammer().on("swipeleft", swipeLeftHandler).on("swiperight", swipeRightHandler); //添加左划右划事件

//设置选项
$ele.data('hammer').get('swipe').set({
    threshold: 1,
    velocity: 0.50
});

function swipeLeftHandler () {
    //左划之后的功能
}

function swipeRightHandler () {
    //右划之后的功能
}