<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312" />
<title>Test</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/reset/reset-min.css">
<style>
.wrapper { margin:100px auto; width:600px; height:100px; }
.wrapper div { float:left; }
.wrapper .left,
.wrapper .right { font-size:30px; font-weight:bold; line-height:100px; color:#999; width:80px; text-align:center; cursor:pointer;}
.wrapper .content { position:relative; overflow:hidden; width:440px; height:100px;}
.wrapper .content ul { width:2000px; position:absolute; left:-5px; top:0; }
.wrapper .content li { 
float:left; margin:5px 0 0 8px; _display:inline;
width:100px; height:90px; border:1px solid #ddd;
font-size:30px; font-weight:bold; line-height:90px; text-align:center;
}
</style>
<script src="http://mootools.net/assets/scripts/mootools.core.js" type="text/javascript"></script>
<script>
window.addEvent('domready',function(){
var len = 4;
var totalLen = $$('ul li').length;
$$('.left, .right').addEvents({
'mouseover': function(e){
if(this.className == 'left'){
if(parseInt($$('ul').getStyle('left')) >= -5){
return false;
}
}else{
if(parseInt($$('ul').getStyle('left')) <= -(totalLen*110-len*110)){
return false;
}
}
this.setStyle('color','#000');
},
'mouseout': function(){
this.setStyle('color','#999');
}
})
$$('ul').set('morph', {
duration: 700, 
transition: 'bounce:out'
});
$$('.right').addEvent('click',function(){
if( parseInt($$('ul').getStyle('left')) > -(totalLen*110-len*110) ){
$$('ul').morph({
'left':(parseInt($$('ul').getStyle('left'))-110)+'px'
});
}
})
$$('.left').addEvent('click',function(){
if( parseInt($$('ul').getStyle('left')) < -5 ){
$$('ul').morph({
'left':(parseInt($$('ul').getStyle('left'))+110)+'px'
});
}
})
})
</script>
</head>
<body>
<div class="wrapper">
<div class="left"><<</div>
<div class="content">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li> </ul>
</div>
<div class="right">>></div>
</div>
</body>
</html>
怎么解决 连续点击出现的错误(点快了 方框显示不完全。)