Search code examples
javascriptjqueryhtmlcssmarquee

Use a marquee in a div only if there is overflow?


I want to scroll text (marquee) in a div tag ONLY when the text overflows.

I have the marquee setup, and I am using the jQuery Marquee plugin. Everything works beautifully with the marquee, but I don't need it to scroll if the text fits on one line.

The page where I am working is here: http://lbrannonent.com/BigCountry247/index.html. The "Title", "Artist", and "Up Next" scrolling fields all need to only scroll if there is overflow.

Any ideas?


Solution

  • Here is the working demo that i made for your question. It should give you the idea what to do.