Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Dec 2010
    Posts
    50
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Text moving (looping text)

    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?

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    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

    Google "jquery marquee" for lots of options.

  • Users who have thanked Fumigator for this post:

    tiger101 (03-04-2011)

  • #3
    New Coder
    Join Date
    Dec 2010
    Posts
    50
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Thanks!!!

  • #4
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    The marquee is now deprecated by the w3c.
    Last edited by bullant; 03-04-2011 at 03:10 AM.

  • #5
    New Coder
    Join Date
    Dec 2010
    Posts
    50
    Thanks
    6
    Thanked 0 Times in 0 Posts
    :-(, so does that mean i cant use that? any other alternatives?

  • #6
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    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.
    Last edited by bullant; 03-04-2011 at 03:38 AM.

  • #7
    New Coder
    Join Date
    Dec 2010
    Posts
    50
    Thanks
    6
    Thanked 0 Times in 0 Posts
    how do i do it the css way? wouldnt it be faster doing it with css? better load time too no?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •