-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Home
Gustavo Villa edited this page Jun 13, 2015
·
6 revisions
Welcome to the typed.js wiki! Here you'll find some cool different use cases for Typed.js.
http://jsfiddle.net/mattboldt/tcRUG/
$(function() {
var options = {
strings: ["First sentence.", "Second sentence."],
typeSpeed: 0
}
$("button").click(function() {
$(".element").typed(options);
});
});
http://jsfiddle.net/mattboldt/M3YaZ/
Here the main difference is the text input. Instead of el.text()
, we're editing el.attr("placeholder");
http://jsfiddle.net/mattboldt/68A9b/
This one is quite custom, so you'll have to dig around the code a bit. Here are the main edits:
backspace: function(curString, curStrPos) {
var self = this;
self.el.fadeOut(function() {
self.el.text("");
});
setTimeout(function() {
curStrPos = 0;
self.el.fadeIn();
// *** continue normal code after this point ***
}, 1000);
}
More to come in the future!