$(document).ready(function() { var wwt=document.getElementById('thepic'); $('#btn1').click(function(){ if(wwt.style.left>=-2400+'px'){ $('#thepic').animate({left:'-=600px'}); } else{ $('#thepic').animate({left:"0"}); } }); $('#btn2').click(function(){ if(wwt.style.left<0+'px'){ $('#thepic').animate({left:'+=600px'}); } else{ $('#thepic').animate({left:"-1800px"}) }});});
添加回答
举报
0/150
提交
取消