View Full Version : Text moving (looping text)

03-03-2011, 02:44 AM
hey guys/gals

I'm looking for text to move to the side or up and down. Example (http://www.bnn.ca/) you see BBN (title on the site) below it is a black strip and below is a text loop. thats what i want to do. any sites you can recommend for that? anyone know how to do that or know any premade scripts for that in jquery or javascrip?

03-03-2011, 04:13 PM
Rather funny this functionality has been part of the basic HTML markup (<marquee> tag) and supported by browsers forever but apparently we can't do it without jQuery now :p

Google "jquery marquee" for lots of options.

03-04-2011, 03:50 AM

03-04-2011, 04:07 AM
The marquee is now deprecated by the w3c.

03-04-2011, 04:22 AM
:-(, so does that mean i cant use that? any other alternatives?

03-04-2011, 04:31 AM
You can use jQuery if you like but imo it is overkill for a simple task like scrolling text. You can do it with just a few lines of javascript by setting a setInterval to continually remove the 1st char off a string of text and push it to the end of the string. Or you can use css positioning to scroll a string across a div continually.

Just google something like "scrolling text javascript" and you'll get lots of examples.

03-04-2011, 04:49 AM
how do i do it the css way? wouldnt it be faster doing it with css? better load time too no?