Skip to content

Instantly share code, notes, and snippets.

@thisislawatts
Created November 11, 2014 16:33
Show Gist options
  • Save thisislawatts/85a72fb6f66104e782d5 to your computer and use it in GitHub Desktop.
Save thisislawatts/85a72fb6f66104e782d5 to your computer and use it in GitHub Desktop.
<!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>
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; }
}
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