Use the jQuery.Marquee plugin (license: ISC ). If you do not want to use the plugin, you can use the following code snippet from the plugin to calculate the delay
// formula is to: (Width of the text node + width of the main container / Width of the main container) * speed; o.duration = ((parseInt(elWidth, 10) + parseInt(containerWidth, 10)) / parseInt(containerWidth, 10)) * o.duration;
With o.duration initialized to 5000 , a value of 5 seconds.
koppor
source share