I've been trying to make a news ticker style...thing. Basically a list of say 5 or so elements (divs, li's, whatever). So the top one shows for 5 seconds, then scrolls up making the others fill the space. My best guess makes the first two boxes act as expected, but it ends there. I can't get the effect to "loop." Here's the code I've been working on for learning purposes. I realize after I get the effect I want working I'll need to set additional paramters (delays and appends). But I just want to get this effect to go all the way through first. Any help will be appreciated. Thanks guys!
<html>
<head>
<script src="jquery.js" type="text/javascript"></script>
<style type="text/css">
#box {
background-color: red;
height: 300px;
width: 300px;
margin-top: 10px; }
</style>
<script type="text/javascript">
$(document).ready(function () {
$('#box').slideUp('slow', function() {
$('#box').next(this).slideUp('slow')
});
});
</script>
</head>
<body>
<a href="#">clicky</a>
<div id="box"></div>
<div id="box"></div>
<div id="box"></div>
<div id="box"></div>
<div id="box"></div>
<div id="box"></div>
</body>
</html>
*EDIT
It looks like the best way is to use Javascripts setInterval function, but I'm not familiar with javascript. Any explanations of this method or others will be helpful. Thanks.