jQuery in Action

Overview

Thanks to jQuery, almost no one remembers the bad old days when developers had to manually manage browser inconsistencies, CSS support, and DOM navigation, and every animation was a frustrating exercise in hand-coded JavaScript. jQuery beautifully manages these concerns, and more, through an elegant, instantly-intuitive library that's become a nearly-universal part of the web. And the latest version of jQuery adds even more features and components to make life as a web developer...

See more details below
Sending request ...

Overview

Thanks to jQuery, almost no one remembers the bad old days when developers had to manually manage browser inconsistencies, CSS support, and DOM navigation, and every animation was a frustrating exercise in hand-coded JavaScript. jQuery beautifully manages these concerns, and more, through an elegant, instantly-intuitive library that's become a nearly-universal part of the web. And the latest version of jQuery adds even more features and components to make life as a web developer smooth and productive.

jQuery in Action, Third Edition, is a fast-paced complete guide to jQuery, focused on the tasks faced in nearly any web dev project. Written for readers with minimal JavaScript experience, this revised edition adds new examples and exercises, along with the deep and practical coverage you expect from an "In Action" book. You'll learn how to traverse HTML documents, handle events, perform animations, write plugins, and even unit test your code. The unique lab pages anchor each concept with real-world code. Several new chapters teach you how to interact with other tools and frameworks to build modern single-page web applications.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

Read More Show Less

Product Details

  • ISBN-13: 9781617292071
  • Publisher: Manning Publications Company
  • Publication date: 7/31/2015
  • Edition number: 3
  • Pages: 475

Meet the Author

Bear Bibeault is coauthor of Manning's bestselling Secrets of the JavaScript Ninja, along with Ajax in Practice, and Prototype and Scriptaculous in Action.

Yehuda Katz is the co-creator of the EmberJS framework, a former lead developer on SproutCore, and is well-known for his contributions to Rails 4, jQuery, Bundler, and Merb.

Aurelio De Rosa is a full-stack web and app developer who develops jQuery plugins and contributes to various open source projects including the jQuery API documentation.

Read More Show Less

Table of Contents

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

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)