Who are we

Haragei is a group of creative people working to make the Internet a more comfortable and functional virtual home for everyone.

We build everything that you can see in your browser – from one-page microsites, through corporate websites and social networks, to web-based applications. Our projects are designed in such a way to be of maximum use to our clients, to comply with industry standards and to provide unmatched user experience.

If you like what we do and you want to get in touch with us, feel free to contact us about any topic.

Categories

Tags

Outgoing

Jquery Horizontal Ticker

written by samurai on April 2, 2009

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.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • StumbleUpon
  • TwitThis
  • Yahoo! Buzz
  • LinkedIn
  • Print this article!
  • E-mail this story to a friend!

Tags: ,

We encouradge to add your comment No Comments

No comments yet.

Your comment

Please keep your comments ontopic and friendly, tnx.