http://pan.baidu.com/s/1c29cfde
https://github.com/stephengao666/chat
自己原创的后台PHP代码,仅供参考
https://github.com/stephengao666/chat
自己原创的后台PHP代码,仅供参考
2016-05-28
$(".btn2").bind("click",function(){
$div1.animate({
left:"-=100px"
},3000,function(){
$div2.html("向左执行完毕")
});
});
});
$div1.animate({
left:"-=100px"
},3000,function(){
$div2.html("向左执行完毕")
});
});
});
$(function(){
var $div1=$(".div1");
var $div2=$(".div2");
$(".btn1").bind("click",function(){
$div1.animate({
left:"+=100px"
},3000,function(){
$div2.html("向右执行完毕");
});
});
});
var $div1=$(".div1");
var $div2=$(".div2");
$(".btn1").bind("click",function(){
$div1.animate({
left:"+=100px"
},3000,function(){
$div2.html("向右执行完毕");
});
});
});
<div class="div0">
<div class="div1"></div>
<input class="btn1" type="button" value="向右"></input>
<input class="btn2" type="button" value="向左"></input>
<div class="div2"></div>
</div>
<div class="div1"></div>
<input class="btn1" type="button" value="向右"></input>
<input class="btn2" type="button" value="向左"></input>
<div class="div2"></div>
</div>
<style>
.div0{position:relative;}
.div1{
position:absolute;
width:90px;
height:90px;
background:#06C;}
input{border:block;margin-top:120px;}
</style>
.div0{position:relative;}
.div1{
position:absolute;
width:90px;
height:90px;
background:#06C;}
input{border:block;margin-top:120px;}
</style>