Skip to content

Instantly share code, notes, and snippets.

@nathanleclaire
Last active December 28, 2015 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanleclaire/7475441 to your computer and use it in GitHub Desktop.
Save nathanleclaire/7475441 to your computer and use it in GitHub Desktop.
Originally a JS Fiddle I put together that I'm making as a gist for reference
<!doctype html>
<html>
<head>
<style>
p {
-webkit-transition: color 4s ease-in-out;
font-size: 72px;
}
p.greenit {
color: Chartreuse;
-webkit-transition: color 4s ease-in-out;
}
</style>
<script src="http://codeorigin.jquery.com/jquery-1.10.2.min.js"></script>
</head>
<body>
<p>
<strong>something ...</strong>
</p>
<script>
$(document).ready(function () {
window.setInterval(function () {
$('p').addClass('greenit');
window.setTimeout(function () {
$('p').removeClass('greenit');
}, 4000);
}, 8000);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment