New to HTML and Javascript coding. Looking for a little bit of help. I have this code but when the line of text changes to the scrolling text it doesn't let the entire line scroll before it fades back to the first line.
The scrolling text line will change regularly, so it will need to be able to pick up when it's finished scrolling.
Is this possible? Please and thank you for all of your help!
HTML Code
<h2 class="quotes">Now Playing on Radio Wolf</h2>
<h2 class="quotes"><marquee width="60%" direction="left" height="100px">5 Seconds of Summer - Permanent Vacation</marquee></h2>
JS Code
(function() {
var quotes = $(".quotes");
var quoteIndex = -1;
function showNextQuote() {
++quoteIndex;
quotes.eq(quoteIndex % quotes.length)
.fadeIn(2000)
.delay(2000)
.fadeOut(2000, showNextQuote);
}
showNextQuote();
})();
CSS Code
.quotes {display: none;}