[thelist] Scrolling ticker

Ken Snyder ksnyder at coremr.com
Thu Jun 7 12:50:01 CDT 2007


Robert Gormley wrote:
> ...
>
> The DIV is much bigger than its viewport, and we're scrolling by 
> adjusting its position, pulling it through x pixels every x msec.
>
> ...
You should be able to calculate the width of each of the banners and the 
width of the scrolling frame using element.clientWidth.  As I 
understand, that works on IE6, IE7, FF, Opera, Safari.  Then move the 
bucket of items left by changing the element.style.left property.  
Knowing all these values, you should be able to determine how many 
pixels of each item is displaying.  You'll then just have to decide what 
is "the next one" when the marquee is halfway in between two items.

-- Ken Snyder






More information about the thelist mailing list