嘿,我有一个滑块,徽标从右侧滑动到左侧。 现在我希望它从右到左重新开始(不会从左到右!)。jQuery滑块循环?
我该怎么做? 我超级新的jQuery
这里是我的代码:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>animate demo</title>
<style>
#background {
width:980px;
height:75px;
background-color:#abc;
}
#logo1 {
position:absolute;
width:234px;
height:40px;
margin:17px 0px 0px 700px;
background-image:url(bru.png);
}
</style>
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<div id="background">
<div id="logo1" class="right"></div>
<script>
$(".right").ready(function() {
$("#logo1").animate({"left":"-=600px"},10000);
});
</script>
</div>
</body>
</html>
您需要继续附加新元素,以便它不会返回。 – Sergio