-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·236 lines (190 loc) · 9.69 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta content="width=device-width; initial-scale=1; maximum-scale=1" name="viewport">
<title>JQuery Flury</title>
<meta content="Washington Botelho" name="author">
<meta content="jQuery Flury - A Labeler Field" name="description">
<meta content="jquery,plugin,focus,blur,field,form,shadow" name="keywords">
<link type="text/css" rel="stylesheet" href="demo/css/application.css">
<link type="text/css" rel="stylesheet" href="lib/jquery.flury.css">
<script type="text/javascript" src="demo/js/jquery.min.js"></script>
<script type="text/javascript" src="lib/jquery.flury.js"></script>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon">
</head>
<body>
<div id="wrapper">
<header role="banner">
<div id="logo">
<h1><a href="http://wbotelhos.com/flury" title="jQuery Flury">jQuery Flury</a></h1>
<p>A Labeler Field</p>
</div>
<nav role="navigation">
<ul>
<li><a href="http://github.com/wbotelhos/flury/archive/0.2.0.zip" title="Download" class="download"><i class="icon-download icon-large"></i>v0.2.0</a></li>
<li><a href="http://github.com/wbotelhos/flury" title="Github" target="_blank"><i class="icon-github icon-large"></i>Github</a></li>
<li><a href="http://wbotelhos.com/labs" title="yLab" target="_blank"><i class="icon-beaker icon-large"></i>yLab</a></li>
<li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X8HEP2878NDEG&item_name=jQuery%20Flury" title="Donate" target="_blank"><i class="icon-heart-empty icon-large"></i>Donate</a></li>
</ul>
</nav>
</header>
<div id="container">
<section role="main">
<article>
<h2 id="default">
<a href="#default">Default:</a>
</h2>
<p>This example shows how to use the default configuration over a form.</p>
<div class="demo">
<form id="default-demo" action="">
<label for="name">Name:</label>
<input id="name" type="text" /><br />
<label for="email">E-mail:</label>
<input id="email" type="email" />
</form>
</div>
<div class="highlight">
<pre>
<span class="nx">$</span><span class="p">(</span><span class="s1">'form'</span><span class="p">).</span><span class="nx">flury</span><span class="p">();</span>
</pre>
</div>
<div class="highlight">
<pre>
<span class="nt"><form</span><span class="nt">></span>
<span class="nt"><label</span> <span class="na">for=</span><span class="s">"name"</span><span class="nt">></span>Name:<span class="nt"></label></span>
<span class="nt"><input</span> <span class="na">id=</span><span class="s">"name"</span> <span class="na">type=</span><span class="s">"text"</span> <span class="nt">/><br</span> <span class="nt">/></span>
<span class="nt"><label</span> <span class="na">for=</span><span class="s">"email"</span><span class="nt">></span>E-mail:<span class="nt"></label></span>
<span class="nt"><input</span> <span class="na">id=</span><span class="s">"email"</span> <span class="na">type=</span><span class="s">"email"</span> <span class="nt">/></span>
<span class="nt"></form></span>
</pre>
</div>
<h2 id="include-demo">
<a href="#include-demo">Including fields:</a>
</h2>
<p>
You can hook just some types of fields changing the attribute <code>include</code>:
</p>
<div class="highlight">
<pre>
<span class="nx">$</span><span class="p">(</span><span class="s1">'form'</span><span class="p">).</span><span class="nx">flury</span><span class="p">({</span> <span class="nx">include</span><span class="o">:</span> <span class="s1">'input:text'</span> <span class="p">});</span>
</pre>
</div>
<h2 id="exclude-demo">
<a href="#exclude-demo">Excluding fields:</a>
</h2>
<p>
The same way you can exclude some fields changing the attribute <code>exclude</code>:
</p>
<div class="highlight">
<pre>
<span class="nx">$</span><span class="p">(</span><span class="s1">'form'</span><span class="p">).</span><span class="nx">flury</span><span class="p">({</span> <span class="nx">exclude</span><span class="o">:</span> <span class="s1">'input:password'</span> <span class="p">});</span>
</pre>
</div>
<h2 id="inline-demo">
<a href="#inline-demo">Inline:</a>
</h2>
<p>
You can prevent <code>absolute</code> style to be applied inline and use it from your CSS.
</p>
<div class="highlight">
<pre>
<span class="nx">$</span><span class="p">(</span><span class="s1">'form'</span><span class="p">).</span><span class="nx">flury</span><span class="p">({</span> <span class="nx">inline</span><span class="o">:</span> <span class="kc">false</span> <span class="p">});</span>
</pre>
</div>
<h2 id="single-demo">
<a href="#single-demo">Single target:</a>
</h2>
<p>
You can bind just some fields without bind the whole form.
</p>
<div class="highlight">
<pre>
<span class="nx">$</span><span class="p">(</span><span class="s1">'#name'</span><span class="p">).</span><span class="nx">flury</span><span class="p">();</span>
</pre>
</div>
<h2 id="global">
<a href="#global">Changing the settings globally:</a>
</h2>
<p>
You can change any option mentioning the scope <code>$.fn.flury.defaults.</code> + <i>option_name</i>. It must be called before you bind the plugin.
</p>
<div class="highlight">
<pre>
<span class="nx">$</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">flury</span><span class="p">.</span><span class="nx">defaults</span><span class="p">.</span><span class="nx">include</span> <span class="o">=</span> <span class="s1">'input:text'</span><span class="p">;</span>
<span class="nx">$</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">flury</span><span class="p">.</span><span class="nx">defaults</span><span class="p">.</span><span class="nx">exclude</span> <span class="o">=</span> <span class="s1">'input:password'</span><span class="p">;</span>
</pre>
</div>
<h2 id="options">
<a href="#options">Options:</a>
</h2>
<div id="exclude" class="option">
<div>exclude: <span>'input[type="button"], input[type="checkbox"], input[type="image"], input[type="radio"], input[type="submit"]'</span></div>
<p>Fields to be excluded of the hook.</p>
</div>
<div id="include" class="option">
<div>include: <span>':input'</span></div>
<p>Fields to be hooked.</p>
</div>
<div id="inline" class="option">
<div>inline: <span>true</span></div>
<p>Applies the `absolute` style inline.</p>
</div>
<h2 id="functions">
<a href="#functions">Functions:</a>
</h2>
<div id="set" class="function">
<div class="highlight">
<pre>
<span class="nx">$</span><span class="p">(</span><span class="s1">'form'</span><span class="p">).</span><span class="nx">flury</span><span class="p">(</span><span class="s1">'set'</span><span class="p">,</span> <span class="p">{</span> <span class="nx">option</span><span class="o">:</span> <span class="s1">'value'</span> <span class="p">})</span>
</pre>
</div>
<p>Override the options declared.</p>
</div>
<h2 id="tests">
<a href="#tests">Tests:</a>
</h2>
<p>
This plugin is tested to work better.
<a href="http://wbotelhos.com/flury/spec/run.html" target="_blank">Check it out!</a>
</p>
</article>
</section>
<div class="author">
<img title="Washington Botelho" src="http://www.gravatar.com/avatar/00c9b483d3c58a12c5f256cf2770d0b8?d=mm" alt="">
<div class="biography">
<p>
Ruby, Java and Python Developer in <a href="http://r7.com" title="R7.com" target="_blank">R7.com</a> Portal.<br />
Bachelor's in Information Systems and certified OCJA 1.0 and OCJP 6.<br />
Helper and learner of the open source community, and designer adventurer.<br />
Also has a passion for dance, skate, jiu-jitsu and Counter Strike Source. (:
</p>
</div>
<div class="social">
<a href="http://github.com/wbotelhos" title="http://github.com/wbotelhos" target="_blank" class="github"></a>
<a href="http://linkedin.com/in/wbotelhos" title="http://linkedin.com/in/wbotelhos" target="_blank" class="linkedin"></a>
<a href="http://twitter.com/wbotelhos" title="http://twitter.com/wbotelhos" target="_blank" class="twitter"></a>
<a href="http://facebook.com/wbotelhos" title="http://facebook.com/wbotelhos" target="_blank" class="facebook"></a>
</div>
</div>
</div>
<footer role="contentinfo">
© 2012 <a href="http://wbotelhos.com" title="wbotelhos.com">wbotelhos.com</a>
</footer>
</div>
<script type="text/javascript">
$(function() {
$('#default-demo').flury();
});
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-719499234-15']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>