Skip to content

Instantly share code, notes, and snippets.

@ezos86
Created July 30, 2014 08:21
Show Gist options
  • Save ezos86/1d66f99f5e705a22c315 to your computer and use it in GitHub Desktop.
Save ezos86/1d66f99f5e705a22c315 to your computer and use it in GitHub Desktop.
A Pen by ezos86.
<div class="quotes">
<p>Here this is the best thing.</p>
</div>
<div class="quotes">
<p>Quote 2 will fading in here.</p>
</div>
<div class="quotes">
<p>Quote 3 doing it's thing.</p>
</div>
(function() {
var quotes = $(".quotes");
var quoteIndex = -1;
function showNextQuote() {
++quoteIndex;
quotes.eq(quoteIndex % quotes.length)
.fadeIn(2000)
.delay(5000)
.fadeOut(2000, showNextQuote);
}
showNextQuote();
})();
.quotes{
display:none;
font-family:Helvetica;
font-size:20px;
text-align:center;
margin:30%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment