How do u..isnt there a way?

Discussion in 'JavaScript' started by xXMetalicDustXx, Nov 26, 2008.

  1. #1
    Hey, I know Ive seen this before, how do you make something like the vendors scrolling across the page here

    http://www.sportsmith.net/

    Underneath the changing flash.


    I know there is some way to do that with JS isnt there?
     
    xXMetalicDustXx, Nov 26, 2008 IP
  2. xlcho

    xlcho Guest

    Messages:
    532
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This can be done with the HTML <marquee> tag. Put the content you want to scroll inside <marquee>CODE GOES HERE</marquee>, there's no difference whether it is just text, images, both, etc. Good luck :)
     
    xlcho, Nov 26, 2008 IP
  3. xXMetalicDustXx

    xXMetalicDustXx Active Member

    Messages:
    487
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #3
    but on scroll over i want it to slow down so users can find what they want to click easier
     
    xXMetalicDustXx, Nov 27, 2008 IP
  4. xlcho

    xlcho Guest

    Messages:
    532
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can use the start() and stop() functions of the marquee. Here's the simplest way to do what you want:
    
    <marquee id='mymarquee' onmouseover='this.stop()' onmouseout='this.start()'>
    some text/links/pictures/whatever...
    </marquee>
    Code (markup):
    Another thing you can do is call this functions from the inside elements. Something like that:
    
    <marquee id='mymarquee'>
    <span onmouseover='this.parentNode.stop()' onmouseout='this.parentNode.start()'>some text/links/pictures/whatever...</span>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <span onmouseover='this.parentNode.stop()' onmouseout='this.parentNode.start()'>another something...</span>
    </marquee>
    Code (markup):
    This way the marquee stops scrolling only when one of the spans inside is being mouseovered, and not when the marquee itself has been mouseovered.

    Good luck :)
     
    xlcho, Nov 27, 2008 IP