fly63前端网

www.fly63.com

首页文章资源工具教程 栏目
  • 关于我们
  • 网站投稿
  • 赞助一下
搜索

在线工具_工作生活好帮手

打造各种简单、易用、便捷的在线工具,网友无需注册和下载安装即可使用

点击查看

关闭

提交网站

unlock.js
分享
复制链接
新浪微博
QQ 好友

扫一扫分享

网站地址:https://github.com/menthe/unlock.js
GitHub:https://github.com/menthe/unlock.js
网站描述:一款jQuery滑动解锁插件

unlock.js是一款jquery滑动解锁插件。目前很多网站在用户登录和注册时,为防止恶意攻击,采用来滑动解锁的验证方式。用户需要滑动指定的滑块到指定位置,才能通过验证。unlock.js可以实现这种滑动解锁功能。 


unlock.js特点:

  • 滑动解锁。
  • 尺寸、颜色、字体大小等都可以个性化定制。
  • 完成解锁后会有回调函数,用来触发进一步的数据处理。

 

unlock.js使用:

1、引入

<link href="path/to/css/unlock.css" rel="stylesheet">
<script src='path/to/js/unlock.js'></script>

2、html

<!--滑块容器-->
<div id = "foo"></div>

3、初始化

var $container = $('#foo');
$container.slideToUnlock(options);

4、配置参数

参数默认值描述
width默认为容器的宽度滑块的宽度
height默认为容器的高度滑块的高度
bgColor#E8E8E8滑块的背景颜色
progressColor#FFE97Fprogress的颜色
handleColor#fff滑块手柄的颜色
succColor#78D02E成功解锁后的颜色
text'slide to unlock'滑块上的默认文字
textColor#000文字的颜色
succText'ok!'成功解锁后显示的文字
succTextColor#000成功解锁后显示的文字颜色
succFuncfunction() { alert('successfully unlock!'); }成功解锁后的回调函数

链接: https://fly63.com/nav/296

more>>
相关栏目
jQuery之家
致力于搜集和整理各种jQuery插件,jQuery特效...
官网
fullPage.js
jQuery全屏滚动插件
官网GitHub
Waterfall.js
瀑布流无限加载插件
官网GitHub
Raty
一个非常棒的jQuery 评分插件
官网GitHub
Bootstrap-waterfall
一款基于Bootstrap仿Pinterest网站的网格瀑布流插件
官网GitHub
Jcrop
一个功能强大的 jQuery 图像裁剪插件
官网GitHub
jcarousel
jQuery轮播图插件
官网GitHub
Parallax.js
一款jQuery滚动视觉差插件
官网GitHub
vegas
一个jQuery / Zepto幻灯片插件
官网GitHub
paroller.js
一款轻量级的页面滚动视觉差特效jquery插件
官网GitHub
lazyload.js
jquery图片懒加载插件
官网GitHub
alertify.js
jQuery酷炫的各种消息提示插件
官网GitHub
pickadate.js
一个轻量级的 jQuery 日期选择插件
官网GitHub
chosen.js
基于jquery的下拉选择框美化插件
官网GitHub
threesixty.js
360度产品图片预览jQuery插件
官网GitHub
textillate.js
实现动感的 CSS3 文本动画的简单插件
官网GitHub

手机预览