clausowitz Posted August 2, 2011 Share Posted August 2, 2011 Hi All, I use some code that I found on-line to display a scrolling text. I am a JavaScript dummy but my question is can someone show me how to stop the scrolling on mouse over. $(function() { var ticker = function() { setTimeout(function(){ $('#ticker li:first').animate( {marginTop: '-120px'}, 800, function() { $(this).detach().appendTo('ul#ticker').removeAttr('style'); }); ticker(); }, 4000); }; ticker(); }); Marco Link to comment https://forums.phpfreaks.com/topic/243601-stop-news-ticker-on-mouse-over/ Share on other sites More sharing options...
Adam Posted August 2, 2011 Share Posted August 2, 2011 jQuery has a .stop() method you an use you stop animations for a given selector. Have a play around and see what you can do... Link to comment https://forums.phpfreaks.com/topic/243601-stop-news-ticker-on-mouse-over/#findComment-1250756 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.