码迷,mamicode.com
首页 > 其他好文 > 详细

zepto下加载openbox弹出层

时间:2016-03-02 11:12:46      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:

function fnOpenBox(objId,animateD,speed,tween,hide){
            var oOpenBox = $(objId);
            oOpenBox.show();
            oOpenBox.animate(animateD,speed,tween,function(){
                if(hide){
                    oOpenBox.hide();
                }
            });
        }

调用

//btn click
        var oBtn = document.getElementById("btn1");
        oBtn.onclick = function(){
            fnOpenBox("#openbox1",{opacity:1,bottom:"0px"},300,"ease-out");
        }

        //close click
        var oBtn = document.getElementById("close1");
        oBtn.onclick = function(){
            fnOpenBox("#openbox1",{opacity:0,bottom:"-100%"},300,"ease-out",true);
        }

 

zepto下加载openbox弹出层

标签:

原文地址:http://www.cnblogs.com/sunbey/p/5233885.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!