Bear Bibeault has been working in the area of web applications since the mid-90s, getting started with beta versions of JSP and Servlets. He is a senior moderator at the popular JavaRanch site, and has contributed articles to that site's JavaRanch Journal. He also co-authored two other Manning books: Ajax in Practice and Prototype and Scriptaculous in Action. Bear works and resides in Austin, TX.
Foreword | p. xi |
Preface | p. xiii |
Acknowledgments | p. xvi |
About this book | p. xix |
About the authors | p. xxiv |
About the title | p. xxvi |
About the cover illustration | p. xxvii |
Introducing jQuery | p. 1 |
Why jQuery? | p. 2 |
Unobtrusive JavaScript | p. 3 |
jQuery fundamentals | p. 5 |
The jQuery wrapper | p. 6 |
Utility functions | p. 8 |
The document ready handler | p. 9 |
Making DOM elements | p. 11 |
Extending jQuery | p. 12 |
Using jQuery with other libraries | p. 14 |
Summary | p. 14 |
Creating the wrapped element set | p. 16 |
Selecting elements for manipulation | p. 17 |
Using basic CSS selectors | p. 19 |
Using child, container, and attribute selectors | p. 20 |
Selecting by position | p. 24 |
Using custom jQuery selectors | p. 27 |
Generating new HTML | p. 31 |
Managing the wrapped element set | p. 32 |
Determining the size of the wrapped set | p. 34 |
Obtaining elements from the wrapped set | p. 34 |
Slicing and dicing the wrapped element set | p. 36 |
Getting wrapped sets using relationships | p. 43 |
Even more ways to use a wrapped set | p. 44 |
Managing jQuery chains | p. 45 |
Summary | p. 47 |
Bringing pages to life with jQuery | p. 48 |
Manipulating element properties and attributes | p. 49 |
Manipulating element properties | p. 51 |
Fetching attribute values | p. 52 |
Setting attribute values | p. 54 |
Removing attributes | p. 56 |
Fun with attributes | p. 56 |
Changing element styling | p. 58 |
Adding and removing class names | p. 58 |
Getting and setting styles | p. 61 |
More useful style-related commands | p. 67 |
Setting element content | p. 68 |
Replacing HTML or text content | p. 68 |
Moving and copying elements | p. 70 |
Wrapping elements | p. 75 |
Removing elements | p. 76 |
Cloning elements | p. 78 |
Dealing with form element values | p. 79 |
Summary | p. 81 |
Events are where it happens! | p. 82 |
Understanding the browser event models | p. 84 |
The DOM Level 0 Event Model | p. 85 |
The DOM Level 2 Event Model | p. 91 |
The Internet Explorer Event Model | p. 97 |
The jQuery Event Model | p. 98 |
Binding event handlers using jQuery | p. 98 |
Removing event handlers | p. 103 |
Inspecting the Event instance | p. 104 |
Affecting the event propagation | p. 106 |
Triggering event handlers | p. 106 |
Other event-related commands | p. 107 |
Putting events (and more) to work | p. 112 |
Summary | p. 124 |
Sprucing up with animations and effects | p. 126 |
Showing and hiding elements | p. 127 |
Implementing a collapsible list | p. 128 |
Toggling the display state of elements | p. 134 |
Animating the display state of elements | p. 135 |
Showing and hiding elements gradually | p. 135 |
Fading elements into and out of existence | p. 140 |
Sliding elements up and down | p. 143 |
Stopping animations | p. 145 |
Creating custom animations | p. 145 |
A custom scale animation | p. 148 |
A custom drop animation | p. 148 |
A custom puff animation | p. 150 |
Summary | p. 152 |
jQuery utility functions | p. 153 |
Using the jQuery flags | p. 154 |
Detecting the user agent | p. 155 |
Determining the box model | p. 161 |
Detecting the correct float style to use | p. 163 |
Using other libraries with jQuery | p. 163 |
Manipulating JavaScript objects and collections | p. 167 |
Trimming strings | p. 168 |
Iterating through properties and collections | p. 169 |
Filtering arrays | p. 170 |
Translating arrays | p. 172 |
More fun with JavaScript arrays | p. 175 |
Extending objects | p. 176 |
Dynamically loading scripts | p. 180 |
Summary | p. 184 |
Extending jQuery with custom plugins | p. 185 |
Why extend? | p. 186 |
The jQuery plugin authoring guidelines | p. 187 |
Naming files and functions | p. 187 |
Beware the $ | p. 189 |
Taming complex parameter lists | p. 190 |
Writing custom utility functions | p. 192 |
Creating a data manipulation utility function | p. 193 |
Writing a date formatter | p. 195 |
Adding new wrapper methods | p. 199 |
Applying multiple operations in a wrapper method | p. 201 |
Retaining state within a wrapper method | p. 206 |
Summary | p. 216 |
Talk to the server with Ajax | p. 217 |
Brushing up on Ajax | p. 218 |
Creating an XHR instance | p. 219 |
Initiating the request | p. 221 |
Keeping track of progress | p. 222 |
Getting the response | p. 223 |
Loading content into elements | p. 224 |
Loading content with jQuery | p. 226 |
Loading dynamic inventory data | p. 229 |
Making GET and POST requests | p. 233 |
Getting data with jQuery | p. 234 |
Getting JSON data | p. 236 |
Making POST requests | p. 248 |
Taking full control of an Ajax request | p. 249 |
Making Ajax requests with all the trimmings | p. 249 |
Setting request defaults | p. 252 |
Global functions | p. 253 |
Putting it all together | p. 258 |
Implementing the flyout behavior | p. 259 |
Using The Termifier | p. 262 |
Room for improvement | p. 264 |
Summary | p. 266 |
Prominent, powerful, and practical plugins | p. 268 |
The Form Plugin | p. 269 |
Getting form control values | p. 270 |
Clearing and resetting form controls | p. 274 |
Submitting forms through Ajax | p. 276 |
Uploading files | p. 284 |
The Dimensions Plugin | p. 285 |
Extended width and height methods | p. 285 |
Getting scroll dimensions | p. 287 |
Of offsets and positions | p. 289 |
The Live Query Plugin | p. 292 |
Establishing proactive event handlers | p. 292 |
Defining match and mismatch listeners | p. 294 |
Forcing Live Query evaluation | p. 294 |
Expiring Live Query listeners | p. 295 |
Introduction to the UI Plugin | p. 299 |
Mouse interactions | p. 300 |
UI widgets and visual effects | p. 316 |
Summary | p. 316 |
The end? | p. 317 |
JavaScript that you need to know but might not! | p. 319 |
Index | p. 339 |
Table of Contents provided by Ingram. All Rights Reserved. |
The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.