robert_gsfame
08-27-2010, 05:42 PM
i really wish to stop the animation once onmouseover and start the animation again when onmouseout...
below is the code
<script type="text/javascript">
$(document).ready(function(){
var first = 0;
var speed = 100;
var pause = 3500;
interval = setInterval(removeFirst, pause);
function removeFirst(){
first = $('ul#listticker li:first').html();
$('ul#listticker li:first')
.animate({opacity: 10}, speed)
.fadeOut('slow', function() {$(this).remove();});
addLast(first);
}
function addLast(first){
last = '<li style="display:none">'+first+'</li>';
$('ul#listticker').append(last)
$('ul#listticker li:last')
.animate({opacity: 1}, speed)
.fadeIn('slow')
}
});
</script>
thx in advance
below is the code
<script type="text/javascript">
$(document).ready(function(){
var first = 0;
var speed = 100;
var pause = 3500;
interval = setInterval(removeFirst, pause);
function removeFirst(){
first = $('ul#listticker li:first').html();
$('ul#listticker li:first')
.animate({opacity: 10}, speed)
.fadeOut('slow', function() {$(this).remove();});
addLast(first);
}
function addLast(first){
last = '<li style="display:none">'+first+'</li>';
$('ul#listticker').append(last)
$('ul#listticker li:last')
.animate({opacity: 1}, speed)
.fadeIn('slow')
}
});
</script>
thx in advance