Jquery Horizontal Ticker
To you all who love jQuery, we present to you small snippet of how we use browser supported marquee tag. Before we figured that in browser if you want to get cross browser compatibility there is no easy way to handle “ticker” functionality, we ended up with solution from ancient times of web.
Only downside of handling in this way is that you will use not so loved marquee tag, although in this way page will be valid, and browser will be very responsive on this behavior.
Here is short snippet :
<script src="jquery.js" type="text/javascript"></script> $(document).ready(function() { try { var ticker_holder = $('.ticker-holder').get(0); var ticker_text = $('.ticker').get(0); var ticker_pos = ticker_text.parentNode.offsetWidth; var ticker_data = $(ticker_holder).html(); $(ticker_text).parent().html('' + ticker_data + ''); $('#sub-nav').hover ( function() { $('marquee', this).get(0).stop(); }, function() { $('marquee', this).get(0).start(); } ); } catch (o) {} });
And you have DEMO of this at our playground.
Feel free to add your thoughts, so maybe we can update this solution in better way in some near future.
Tags: jQuery, open source
We encouradge to add your comment No Comments
No comments yet.
Your comment
Please keep your comments ontopic and friendly, tnx.











