Skip to content

Commit 35a6079

Browse files
committed
some updates for usage w/o jquery
1 parent e984e36 commit 35a6079

File tree

5 files changed

+4
-14
lines changed

5 files changed

+4
-14
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,7 @@ This is really all you need to get going.
1717
<script src="typed.js"></script>
1818
<script>
1919
document.addEventListener("DOMContentLoaded", function(){
20-
Typed.select(".elements", {
21-
strings: ["First sentence.", "Second sentence."],
22-
typeSpeed: 0
23-
});
24-
25-
// or
26-
27-
new Typed(document.querySelector(".element"), {
20+
Typed.select(".element", {
2821
strings: ["First sentence.", "Second sentence."],
2922
typeSpeed: 0
3023
});

dist/typed.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
<head>
44
<meta charset="UTF-8">
55
<title>Typed.js - Type your heart out</title>
6-
<!-- Get jQuery -->
76
<script src="js/typed.js" type="text/javascript"></script>
87
<script>
98
document.addEventListener('DOMContentLoaded', function(){
109

1110
Typed.select("#typed", {
12-
// strings: ["Typed.js is an <strong>Awesome</strong> library.", "It <em>types</em> out sentences.", "And then deletes them.", "Try it out!"],
1311
stringsElement: document.getElementById('typed-strings'),
1412
typeSpeed: 30,
1513
backDelay: 500,
@@ -81,7 +79,7 @@ <h1 class="h1">Typed.js</h1>
8179

8280
<div class="type-wrap">
8381
<div id="typed-strings">
84-
<span>Typed.js is a <strong>Awesome</strong> library.</span>
82+
<span>Typed.js is a <strong>JavaScript</strong> library.</span>
8583
<p>It <em>types</em> out sentences.</p>
8684
<p>And then deletes them.</p>
8785
<p>Try it out!</p>

js/typed.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@
140140
this.strings = [];
141141
this.stringsElement.style.display = 'none';
142142
var strings = Array.prototype.slice.apply(this.stringsElement.children);
143-
console.log(strings);
144143
strings.forEach(function(stringElement){
145144
self.strings.push(stringElement.innerHTML);
146145
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"animation"
1313
],
1414
"devDependencies": {
15-
"gulp": "^3.8.10",
15+
"gulp": "^3.9.1",
1616
"gulp-rename": "^1.2.0",
1717
"gulp-uglify": "^1.1.0"
1818
}

0 commit comments

Comments
 (0)