forked from bseth99/jquery-ui-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
147 lines (108 loc) · 5.54 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
<!Doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>jQueryUI Extensions Collection</title>
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
</head>
<body>
<div style="width: 600px; margin: auto">
<h1>jQuery UI Extensions</h1>
<p>This my collection of customizations and enhancements to the standard jQuery UI library. </p>
<p class="text-center">
<iframe src="http://ghbtns.com/github-btn.html?user=bseth99&repo=jquery-ui-extensions&type=fork"
allowtransparency="true" frameborder="0" scrolling="0" width="53" height="20"></iframe>
<iframe src="http://ghbtns.com/github-btn.html?user=bseth99&repo=jquery-ui-extensions&type=watch"
allowtransparency="true" frameborder="0" scrolling="0" width="62" height="20"></iframe>
<iframe src="http://ghbtns.com/github-btn.html?user=bseth99&type=follow"
allowtransparency="true" frameborder="0" scrolling="0" width="132" height="20"></iframe>
</p>
<p class="text-center">
<a class="btn btn-primary" rel="nofollow" href="https://github.com/bseth99/jquery-ui-extensions/archive/master.zip" >
Download Latest Version
</a>
</p>
<h2>Features</h2>
<ul>
<li><p><strong>Spinner</strong>: Add <code>alignment</code> to the available options to create four different alternative
layouts for the spin buttons.</p></li>
<li><p><strong>SlideSpinner</strong>: Adds a Slider control to the Spinner to enable visual reference to where
a user is in the valid range and a faster way to change values.</p></li>
<li><p><strong>LabeledSlider</strong>: Adds tick marks at configurable intervals to the Slider control. Optional text labels
can also be passed to the widget.</p></li>
<li><p><strong>ComboBox</strong>: Enhances the demo provided on the <a href="http://jqueryui.com/autocomplete/#combobox">jQueryUI site</a>
by adding a value function and some addtional features.</p></li>
<li><p><strong>WaitButton</strong>: Extends the default jQueryUI Button widget by adding a spinner and disabling the
button when its clicked. Prevents multiple clicking and provides visual feedback that something
is happening.</p></li>
<li><p><strong>Scrollable</strong>: Moved to <a href="../jquery-ui-scrollable/index.html">bseth99/jquery-ui-scrollable</a></p></li>
</ul><h2>
<a name="usage" class="anchor" href="#usage"><span class="octicon octicon-link"></span></a>Usage</h2>
<p>Either download the
<a href="https://raw.github.com/bseth99/jquery-ui-extensions/master/dist/ext-jquery-ui.min.js">Minified</a> or the
<a href="https://raw.github.com/bseth99/jquery-ui-extensions/master/dist/ext-jquery-ui.js">Full</a> source and add it
after the normal jQuery UI scripts.</p>
<p>Also download the <a href="https://raw.github.com/bseth99/jquery-ui-extensions/master/dist/ext-jquery-ui.css">CSS</a>
file and include it after any jQuery UI CSS files.</p>
<p>You can also just browse the source and grab what you want to use. Just be mindful of the dependencies:</p>
<ul>
<li>
<strong>SlideSpinner</strong>: Requires the enhanced Spinner control</li>
</ul><h3>
<a name="waitbutton" class="anchor" href="#waitbutton"><span class="octicon octicon-link"></span></a>WaitButton</h3>
<p>WaitButton adds two options that enable controling the label and icon used to show the waiting status:</p>
<pre><code> $('#save')
.waitbutton({
waitLabel: 'Saving ...',
waitIcon: 'my-icon-class'
})
</code></pre>
<p>Neither are required to use the widget. When omitted, the label will remain the same as the current label and
the class used for the primary icon will be the default ui-icon-waiting class which expects a GIF named
waitbutton-loading.gif to be present in a images folder relative to the CSS file. You can use the <a href="https://raw.github.com/bseth99/jquery-ui-extensions/master/dist/images/waitbutton-loading.gif">one I have
created</a>
or design your own. Just be aware that the ui-icon class on the button widget a lot 16x16 pixels for
the icon.</p>
<p>The widget triggers a <code>waiting</code> event when a user clicks the button. An object is passed to the handler with
a callback that should be called once the action is complete. Failure to call the callback will result in the
button remaining in the waiting state.</p>
<pre><code> $('#save')
.waitbutton({
waiting: function ( e, ui ) {
// do something
ui.done();
}
})
</code></pre>
<p>or</p>
<pre><code> $('#save')
.waitbutton()
.on( 'buttonwaiting', function ( e, ui ) {
// do something
ui.done();
}
})
</code></pre>
<p>The <code>done()</code> callback takes up to two option arguments that control the new label and state of the button.
Review the <a href="tests/visual/waitbutton/base.html">demo</a> for examples of each variation.</p>
<h2>Demo</h2>
<p>I created some <a href="tests/visual/index.html">tests</a> that
show what the widgets can do. </p>
<h2>License</h2>
<p>Copyright (c) 2012-2014 Ben Olson <br/>
Licensed under the MIT License</p>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-34780028-1']);
_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>