Jump to content

Marquee


garyblackpool

Recommended Posts

Yeah i have got that. Okay i have an idea of how it would work- i have a div container with overflow hidden and set to no-wrap. I read the innerHtml; move the <p> and append a child element when it gets to a certain and then delete the one which has gone out of view. And repeat the process.Is that how it should be done or am i making it a bit more complicated than necessary?Thanks.Gary

Link to comment
Share on other sites

I'd just have one element inside the <div>. Move the element until its position is as far outside the box as its width (a negative number). You can get the position using offsetLeft and the width with offsetWidth.Once you know it's outside of the box, set the position to the width of the container (offsetWidth of the parent <div>), that puts it right outside the right end of the container.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...