Created
November 11, 2014 16:33
-
-
Save thisislawatts/85a72fb6f66104e782d5 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/haluzivajo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
body { | |
padding-top: 4em; | |
} | |
.typed-cursor{ | |
opacity: 1; | |
-webkit-animation: blink 0.7s infinite; | |
-moz-animation: blink 0.7s infinite; | |
animation: blink 0.7s infinite; | |
} | |
@keyframes blink{ | |
0% { opacity:1; } | |
50% { opacity:0; } | |
100% { opacity:1; } | |
} | |
@-webkit-keyframes blink{ | |
0% { opacity:1; } | |
50% { opacity:0; } | |
100% { opacity:1; } | |
} | |
@-moz-keyframes blink{ | |
0% { opacity:1; } | |
50% { opacity:0; } | |
100% { opacity:1; } | |
} | |
</style> | |
</head> | |
<body> | |
<div class="element">Hello World</div> | |
<script id="jsbin-javascript"> | |
var $el = jQuery('.element'), | |
text = $el.text().split(''); | |
$el.html(false); | |
var counter = 0, | |
typingSpeed = 500; | |
setInterval(function() { | |
$el.append(text[counter]); | |
counter++; | |
}, typingSpeed); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//code.jquery.com/jquery-1.11.1.min.js"><\/script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="element">Hello World</div> | |
</body> | |
</html></script> | |
<script id="jsbin-source-css" type="text/css">body { | |
padding-top: 4em; | |
} | |
.typed-cursor{ | |
opacity: 1; | |
-webkit-animation: blink 0.7s infinite; | |
-moz-animation: blink 0.7s infinite; | |
animation: blink 0.7s infinite; | |
} | |
@keyframes blink{ | |
0% { opacity:1; } | |
50% { opacity:0; } | |
100% { opacity:1; } | |
} | |
@-webkit-keyframes blink{ | |
0% { opacity:1; } | |
50% { opacity:0; } | |
100% { opacity:1; } | |
} | |
@-moz-keyframes blink{ | |
0% { opacity:1; } | |
50% { opacity:0; } | |
100% { opacity:1; } | |
}</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var $el = jQuery('.element'), | |
text = $el.text().split(''); | |
$el.html(false); | |
var counter = 0, | |
typingSpeed = 500; | |
setInterval(function() { | |
$el.append(text[counter]); | |
counter++; | |
}, typingSpeed);</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
padding-top: 4em; | |
} | |
.typed-cursor{ | |
opacity: 1; | |
-webkit-animation: blink 0.7s infinite; | |
-moz-animation: blink 0.7s infinite; | |
animation: blink 0.7s infinite; | |
} | |
@keyframes blink{ | |
0% { opacity:1; } | |
50% { opacity:0; } | |
100% { opacity:1; } | |
} | |
@-webkit-keyframes blink{ | |
0% { opacity:1; } | |
50% { opacity:0; } | |
100% { opacity:1; } | |
} | |
@-moz-keyframes blink{ | |
0% { opacity:1; } | |
50% { opacity:0; } | |
100% { opacity:1; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $el = jQuery('.element'), | |
text = $el.text().split(''); | |
$el.html(false); | |
var counter = 0, | |
typingSpeed = 500; | |
setInterval(function() { | |
$el.append(text[counter]); | |
counter++; | |
}, typingSpeed); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment