Commit 74b81892 authored by fred's avatar fred
Browse files

newsroll: stop auto update once the user clicked on a newsitem

parent 9002c2b4
......@@ -35,17 +35,19 @@
<script>
$(function() {
$('#ticker li:not(:first)');
var ticker_interval;
function tick(){
$('#ticker li:first').animate({'opacity':0}, 200, function () {
$(this).appendTo($('#ticker')).css('opacity', 1);
});
}
$("#roller button").on('click',function(e){
clearInterval(ticker_interval);
e.preventDefault();
$($(this).attr('data-about')).prependTo('#ticker');
return false;
});
setInterval(function(){tick(); }, 5000);/**/
ticker_interval = setInterval(function(){tick(); }, 5000);/**/
});
</script>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment