Hi,
Could you please take a look at following link and let me know how I can add a loop to my script in order to repeat the animate() function for example for every 30 seconds?
as you can see the animate function just runs for one time but I would like to repeat it for every 30 seconds.
I also would like to add a function to stop the animation when user mouse over on the Logo div.
Here is the code
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Moving Div</title>
<style type="text/css">
#container {
height: 600px;
margin: 0 auto;
width: 985px;
}
#content {
background-color: #EEEEEE;
border-color: #DDDDDD;
border-style: solid;
border-width: 1px;
position:relative;
height: auto;
margin: 25px 8px 0;
margin-bottom: 0 auto;
padding: 15px;
width: 95%;
overflow:hidden;
}
#logo {
background-color: #EBB00C;
color:black;
border-color: #F6EFDC;
border-size:3px;
border-style: solid;
border-width: 1px;
position:relative;
width:250px;
padding: 10px;
margin-left:-300px;
}
</style>
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#logo').animate({left:"+=1500"},25000);
});
</script>
</head>
<body>
<div id="container">
<div id="content">
<div id="logo">This is For Test</div>
</div>
</div>
</body>
</html>
I appreciate your time in advanced!