-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathindex.html
94 lines (68 loc) · 3.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
<title>jquery.typer.js by layervault</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://raw.github.com/layervault/jquery.typer.js/master/src/jquery.typer.js"></script>
</head>
<body>
<header>
<div class="container">
<h1>jquery.typer.js</h1>
<h2>A simple jQuery plugin for <span data-typer-targets="a nice parlor trick.,great justice.,a better world.,a just society.,a slick typing effect.,a newer <marquee>">a slick typing effect.</span></h2>
<section id="downloads">
<a href="https://github.com/layervault/jquery.typer.js/zipball/master" class="btn">Download as .zip</a>
<a href="https://github.com/layervault/jquery.typer.js/tarball/master" class="btn">Download as .tar.gz</a>
<a href="https://github.com/layervault/jquery.typer.js" class="btn btn-github"><span class="icon"></span>View on GitHub</a>
</section>
</div>
</header>
<div class="container">
<section id="main_content">
<h3>Usage</h3>
<p>jquery.typer.js can be used one of two ways:</p>
<h4>Type once with <code>typeTo()</code></h4>
<p>If you just want to use the effect once, you should use <code>typeTo()</code>. It can be used as follows:</p>
<pre><code>$('h3').typeTo("New Text");</code></pre>
<p>This will do a one-time transition.</p>
<h4>Type indefinitely with <code>typer()</code></h4>
<p>Now let's say you want to loop over a set of strings for the typing effect. Easy!</p>
<pre><code> $('[data-typer-targets]').typer() </code></pre>
<p>That code will start the effect on all elements with the <code>data-typer-targets</code> attribute.</p>
<p>You obviously need to supply it with some source data. The <code>data-typer-targets</code> attribute can be
either a comma-separated string or a piece of JSON.</p>
<h3>Customize</h3>
<p>There are a few options that you can customize.</p>
<pre><code> $.typer.options = {
highlightSpeed : 20,
typeSpeed : 100,
clearDelay : 500,
typeDelay : 200,
clearOnHighlight : true,
typerDataAttr : 'data-typer-targets',
typerInterval : 2000
};</code></pre>
<p>Set them individually:</p>
<pre><code> $.typer.options.highlightSpeed = 1000; </code></pre>
<p>Or as a whole:</p>
<pre><code> $.typer.options = {
typeSpeed: 10,
typerDataAttr: 'data-values'
}; </code></pre>
<p>Options must be set before invoking <code>typer()</code> or <code>typeTo()</code></p>
<h3>Created by <a href="http://grinshtein.com">Allan Grinshtein</a> and <a href="http://kellysutton.com">Kelly Sutton</a> of <a href="http://layervault.com">LayerVault</a>.</h3>
<h3>Released under the MIT license.</h3>
</section>
</div>
<script>
$(function () {
$('[data-typer-targets]').typer();
});
</script>
</body>
</html>