Foreword |
|
xiii | |
Preface |
|
xv | |
Acknowledgments |
|
xvi | |
About This Book |
|
xviii | |
About The Cover Illustration |
|
xxi | |
|
|
1 | (40) |
|
|
3 | (15) |
|
1.1 What is in jQuery UI? |
|
|
4 | (2) |
|
1.2 The benefits of using jQuery UI |
|
|
6 | (3) |
|
Cohesive and consistent APIs |
|
|
6 | (1) |
|
Comprehensive browser support |
|
|
7 | (1) |
|
Open source and free to use |
|
|
7 | (1) |
|
|
7 | (1) |
|
Powerful theming mechanism |
|
|
7 | (1) |
|
Emphasis on accessibility |
|
|
8 | (1) |
|
Stable and maintenance friendly |
|
|
9 | (1) |
|
1.3 The limitations of jQuery UI |
|
|
9 | (2) |
|
|
9 | (1) |
|
jQuery UI and mobile devices |
|
|
10 | (1) |
|
1.4 Getting started with the library |
|
|
11 | (1) |
|
|
11 | (1) |
|
Downloading from the jQuery UI website |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
12 | (3) |
|
1.6 Using an online testing tool |
|
|
15 | (2) |
|
|
17 | (1) |
|
2 Enhancing UIs with midgets |
|
|
18 | (23) |
|
2.2 Customizing widgets with options |
|
|
20 | (4) |
|
2.3 Modifying widgets with methods |
|
|
24 | (7) |
|
|
24 | (3) |
|
Using option() to modify widgets |
|
|
27 | (1) |
|
Using dialogs to edit lists |
|
|
28 | (3) |
|
2.4 Responding to widget changes with events |
|
|
31 | (8) |
|
Subscribing to widget events |
|
|
32 | (2) |
|
Event handlers vs. callbacks |
|
|
34 | (1) |
|
|
35 | (4) |
|
|
39 | (2) |
|
|
41 | (142) |
|
3 Building complex web forms with jQuery UI |
|
|
43 | (34) |
|
3.1 The challenges of building modern web forms |
|
|
44 | (2) |
|
3.2 Autocomplete: suggesting input options to users |
|
|
46 | (9) |
|
|
47 | (2) |
|
Loading from a remote source |
|
|
49 | (3) |
|
Using autocomplete with third-party services and APIs |
|
|
52 | (3) |
|
3.3 Button: enhancing native buttons, inputs, and links |
|
|
55 | (4) |
|
3.4 Selectmenu: enhancing native <select>elements |
|
|
59 | (3) |
|
3.5 Datepicker: selecting dates from a pop-up calendar |
|
|
62 | (7) |
|
Parsing and formatting dates |
|
|
64 | (3) |
|
Handling date globalization |
|
|
67 | (2) |
|
3.6 Spinner: enhancing native <input>elements to collect numeric data |
|
|
69 | (2) |
|
3.7 Completing the appointment form |
|
|
71 | (3) |
|
3.8 HTML5 elements vs. jQuery UI widgets |
|
|
74 | (2) |
|
|
76 | (1) |
|
4 Enhancing interfaces with layout and utility widgets |
|
|
77 | (30) |
|
4.1 Accordion: creating toggleable content panels |
|
|
78 | (4) |
|
Configuring the accordion widget |
|
|
79 | (2) |
|
Adding and removing panels |
|
|
81 | (1) |
|
4.2 Tabs: toggling between content areas |
|
|
82 | (6) |
|
|
83 | (1) |
|
Loading movie information in a tabs widget |
|
|
83 | (5) |
|
4.3 Menu: creating web menus with semantic markup |
|
|
88 | (3) |
|
4.4 Dialog: displaying content in a pop-up container |
|
|
91 | (3) |
|
4.5 Progressbar: displaying the progress of a task |
|
|
94 | (3) |
|
4.6 Slider: selecting a value using moveable handles |
|
|
97 | (4) |
|
|
98 | (1) |
|
|
99 | (2) |
|
4.7 Tooltip: enhancing native tooltips with a customizable control |
|
|
101 | (5) |
|
Using custom tooltip content |
|
|
103 | (1) |
|
Displaying a preview in a tooltip |
|
|
104 | (2) |
|
|
106 | (1) |
|
5 Adding interaction to your interfaces |
|
|
107 | (28) |
|
5.1 Draggable: allowing users to move elements |
|
|
108 | (2) |
|
5.2 Droppable: creating containers that accept draggables |
|
|
110 | (8) |
|
Building a drag-and-drop game |
|
|
110 | (4) |
|
|
114 | (4) |
|
5.3 Sortable: rearranging elements in a list |
|
|
118 | (7) |
|
|
121 | (1) |
|
Building a fruit and vegetable sorting game |
|
|
121 | (4) |
|
5.4 Resizable allowing users to change the size of elements |
|
|
125 | (5) |
|
Using custom resize handles |
|
|
126 | (1) |
|
Building an appointment scheduler |
|
|
127 | (3) |
|
5.5 Selectable: allowing users to select elements from a group |
|
|
130 | (2) |
|
5.6 Creating multidevice interactions: the importance of touch |
|
|
132 | (2) |
|
Why doesn't jQuery UI support touch events? |
|
|
132 | (1) |
|
Introducing jQuery UI Touch Punch |
|
|
133 | (1) |
|
|
134 | (1) |
|
6 Creating rich animations with effects |
|
|
135 | (27) |
|
6.1 Using effects and the effect() method |
|
|
136 | (6) |
|
Customizing effects with easings |
|
|
138 | (2) |
|
Making visual associations with the transfer effect |
|
|
140 | (2) |
|
6.2 Animating visibility changes |
|
|
142 | (5) |
|
Building form validation messages |
|
|
142 | (2) |
|
Building portlets with jQuery UI |
|
|
144 | (3) |
|
6.3 Using effects with the jQuery UI widgets |
|
|
147 | (4) |
|
The show and hide options |
|
|
147 | (1) |
|
Showing a message in a dialog |
|
|
148 | (3) |
|
6.4 Animating CSS class name changes |
|
|
151 | (5) |
|
Enhancing addClass(), removeClass(), and toggleClass() |
|
|
151 | (2) |
|
Building an off-canvas navigation menu for mobile |
|
|
153 | (3) |
|
6.5 Effects vs. CSS3 animations and transitions |
|
|
156 | (5) |
|
CSS3 transitions vs. the jQuery UI class name methods |
|
|
156 | (2) |
|
CSS animations vs. effects |
|
|
158 | (3) |
|
|
161 | (1) |
|
7 Theming and styling applications-with jQuery UI |
|
|
162 | (21) |
|
7.1 Using built-in and custom themes |
|
|
163 | (3) |
|
7.2 Using the jQuery UI CSS framework to customize applications |
|
|
166 | (8) |
|
Styling widget containers |
|
|
167 | (1) |
|
Styling interaction states |
|
|
168 | (1) |
|
|
169 | (3) |
|
Building a styled confirmation dialog |
|
|
172 | (2) |
|
7.3 Styling with widget class names |
|
|
174 | (7) |
|
|
176 | (2) |
|
Building a mobile-friendly datepicker |
|
|
178 | (1) |
|
Adding arrows to tooltips with CSS |
|
|
179 | (2) |
|
|
181 | (2) |
|
Part 3 Customization and advanced usage |
|
|
183 | (136) |
|
8 Using the widget factory to build stateful plugins |
|
|
185 | (28) |
|
|
186 | (10) |
|
Constructing widgets with $.widget() |
|
|
187 | (2) |
|
Choosing a markup structure |
|
|
189 | (1) |
|
Overriding_create() to initialize widgets |
|
|
190 | (3) |
|
|
193 | (2) |
|
Listening for events with_on() |
|
|
195 | (1) |
|
8.2 Customizing widgets with options, methods, and events |
|
|
196 | (9) |
|
Making widgets configurable with options |
|
|
197 | (3) |
|
Changing the widget's state with methods |
|
|
200 | (2) |
|
Triggering widget events with_trigger() |
|
|
202 | (3) |
|
8.3 Enabling, disabling, and destroying widgets |
|
|
205 | (7) |
|
Enabling and disabling a widget |
|
|
205 | (2) |
|
Undoing a widget's effects with_destroy() |
|
|
207 | (5) |
|
|
212 | (1) |
|
9 Extending widgets with the widget factory |
|
|
213 | (25) |
|
9.1 Building widget extensions |
|
|
214 | (11) |
|
Changing existing and adding new options to a widget |
|
|
214 | (4) |
|
Redefining widgets with the widget factory |
|
|
218 | (2) |
|
Extending a custom widget |
|
|
220 | (5) |
|
9.2 Customizing widgets with extension points |
|
|
225 | (6) |
|
Using undocumented extension points |
|
|
227 | (3) |
|
Adding your own extension points |
|
|
230 | (1) |
|
9.3 Extending the datepicker widget |
|
|
231 | (5) |
|
Building a mobile-friendly datepicker extension |
|
|
234 | (2) |
|
|
236 | (2) |
|
10 Preparing your application for production |
|
|
238 | (21) |
|
10.1 The problem with third-party CDNs |
|
|
239 | (2) |
|
10.2 Downloading jQuery UI from Download Builder |
|
|
241 | (2) |
|
10.3 Managing JavaScript dependencies with AMD |
|
|
243 | (6) |
|
Setting up RequireJS for development |
|
|
245 | (1) |
|
Loading jQuery UI components with RequireJS |
|
|
246 | (3) |
|
10.4 Building your application's assets with the optimizer |
|
|
249 | (5) |
|
Optimizing JavaScript assets |
|
|
249 | (2) |
|
Optimizing CSS dependencies |
|
|
251 | (3) |
|
10.5 Supporting AMD in custom widgets |
|
|
254 | (3) |
|
|
257 | (2) |
|
11 Building a flight-search application |
|
|
259 | (28) |
|
11.1 Structuring your application |
|
|
260 | (1) |
|
11.2 Collecting user input |
|
|
261 | (10) |
|
Building an airport code autocomplete |
|
|
263 | (2) |
|
Poly filling HTML5 inputs with jQuery UI |
|
|
265 | (3) |
|
Validating user input with HTML5 |
|
|
268 | (3) |
|
11.3 Connecting to a RESTful API |
|
|
271 | (3) |
|
Looking up flights with $.ajax() |
|
|
271 | (1) |
|
|
272 | (2) |
|
11.4 Displaying the results on the screen |
|
|
274 | (5) |
|
Storing and resolving templates with RequireJS |
|
|
276 | (1) |
|
Showing a processing indicator while data loads |
|
|
277 | (2) |
|
11.5 Adding a responsive design |
|
|
279 | (4) |
|
11.6 Preparing the application for production |
|
|
283 | (1) |
|
11.7 Getting the optimal performance with almond |
|
|
284 | (2) |
|
|
286 | (1) |
|
12 Under the hood of jQuery UI |
|
|
287 | (32) |
|
12.1 Positioning elements with the position utility |
|
|
287 | (10) |
|
Building a UI walkthrough with the position utility and dialog widget |
|
|
290 | (3) |
|
Handling collisions elegantly |
|
|
293 | (2) |
|
Controlling the collision detection |
|
|
295 | (2) |
|
12.2 Using the utility functionality in jQuery UI Core |
|
|
297 | (3) |
|
|
297 | (2) |
|
|
299 | (1) |
|
12.3 Accessing and managing widget instances |
|
|
300 | (2) |
|
Detecting widget instances with: data() |
|
|
301 | (1) |
|
12.4 Advanced widget prototype methods and properties |
|
|
302 | (9) |
|
A widget's prototype chain explained |
|
|
303 | (2) |
|
Using a widget's default element to streamline initialization |
|
|
305 | (2) |
|
Supporting embedded-window use in widgets |
|
|
307 | (1) |
|
Displaying elements with_show() and_hide() |
|
|
308 | (2) |
|
Customizing options on the fly |
|
|
310 | (1) |
|
12.5 Using autoinitialization to remove boilerplate code |
|
|
311 | (7) |
|
How jQuery Mobile's autoinitialization works |
|
|
312 | (2) |
|
jQuery Mobile's widget extension |
|
|
314 | (1) |
|
Autoinitializing jQuery UI widgets |
|
|
315 | (3) |
|
|
318 | (1) |
Appendix A Learning jQuery |
|
319 | (6) |
Appendix B How jQuery UI tests jQuery UI |
|
325 | (7) |
Appendix C Using jQuery UI with Backbone |
|
332 | (5) |
Appendix D Creating decimal, currency, and time pickers with Globalize |
|
337 | (6) |
Appendix E Contributing to jQuery UI |
|
343 | (5) |
Appendix F Poly filling HTML5 with jQuery UI |
|
348 | (7) |
Index |
|
355 | |