一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

jQuery滑动解锁插件SlideUnlock使用例子

时间:2016-04-07 编辑:简简单单 来源:一聚教程网

基于jQuery的滑动解锁插件SlideUnlock

html


   
   

       
        Slide to unlock!
   

css

.slideunlock-wrapper{
   
    position: relative;
    padding: 50px;
    background: #ECF0F1;
    margin: 0 auto;
}
.slideunlock-slider{
    padding:20px;
    position: relative;
    border-radius: 2px;
    background-color: #FDEB9C;
    overflow: hidden;
    text-align: center;
}
.slideunlock-slider.success{
    background-color: #E5EE9F;
}
.slideunlock-label{
   
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #E67E22;
    z-index: 999;
    border-radius: 2px;
    cursor: pointer;
}
.slideunlock-label-tip{
    z-index: 9;
}
@media screen and (max-) {
    .slideunlock-wrapper{
        width: 64%;
    }
}


JavaScript

depend on jQuery




var slider = new SliderUnlock(element, options, success, always);
slider.init();
// element is required and right. id or class or any identifying which can be loaded by jquery.
// if you dont want to give options, please give a null object, like this -- {}
//If you need to support mobile,Please add jQuery mobile plugin:

热门栏目