qq_那时花儿开_0
2017-06-15 17:27
var swipe=new Swipe($(".content"));
var boy=new BoyWalk();
var c=$(".content");
var b={
element: $(".b_background"),
dark:function(){
this.element.removeClass("lamp-bright");
},
bright:function(){
this.element.addClass("lamp-bright");
}
};
function doorAction(l,r,t){
var d=$.Deferred();
var count = 2;
var complete = function() {
if (count == 1) {
d.resolve();
return;
}
count--;
};
$(".door-left").transition({
'left': l
}, t,complete());
$(".door-right").transition({
'left': r
}, t,complete());
return d;
}
$("button:first").click(function(){
doorAction('-50%', '100%', 2000).then(function(){
b.bright();
});
});
$("button:last").click(function(){
doorAction('0%', '50%', 2000).then(function(){
b.dark();
});
});
水一波
H5+JS+CSS3实现七夕言情
211523 学习 · 540 问题
相似问题