Learning JQuery 3 - Fifth Edition Create Efficient and Smart Web Applications with JQuery 3. 0 Using This Step-By-step Practical Tutorial

Uloženo v:
Podrobná bibliografie
Hlavní autoři: Boduch, Adam, Chaffer, Jonathan, Swedberg, Karl
Médium: E-kniha
Jazyk:angličtina
Vydáno: Birmingham Packt Publishing, Limited 2017
Vydání:5
Témata:
On-line přístup:Získat plný text
Tagy: Přidat tag
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!
Obsah:
  • Cover -- Credits -- Copyright -- About the Authors -- About the Reviewer -- www.PacktPub.com -- Customer Feedback -- Table of Contents -- Preface -- Chapter 1: Getting Started -- What jQuery does? -- Why jQuery works well? -- What's new in jQuery 3? -- Browser support -- Deferred objects -- Asynchronous document-ready -- All the rest -- Making our first jQuery-powered web page -- Downloading jQuery -- Setting up jQuery in an HTML document -- Adding our jQuery code -- Finding the poem text -- Injecting the new class -- Executing the code -- The finished product -- Plain JavaScript versus jQuery -- Using development tools -- Chrome Developer Tools -- Summary -- Chapter 2: Selecting Elements -- Understanding the DOM -- Using the () function -- CSS selectors -- Styling list-item levels -- Selector specificity -- Attribute selectors -- Styling links -- Custom selectors -- Styling alternate rows -- Finding elements based on textual content -- Form selectors -- DOM traversal methods -- Styling specific cells -- Chaining -- Iterating over jQuery objects -- Accessing DOM elements -- Summary -- Further reading -- Exercises -- Chapter 3: Handling Events -- Performing tasks on page load -- Timing of code execution -- Handling multiple scripts on one page -- Passing an argument to the document ready callback -- Handling simple events -- A simple style switcher -- Enabling the other buttons -- Making use of event handler context -- Consolidating code using event context -- Shorthand events -- Showing and hiding page elements -- Event propagation -- The journey of an event -- Side effects of event bubbling -- Altering the journey - the event object -- Event targets -- Stopping event propagation -- Preventing default actions -- Delegating events -- Using built-in event delegation capabilities -- Removing an event handler -- Giving namespaces to event handlers
  • Rebinding events -- Simulating user interaction -- Reacting to keyboard events -- Summary -- Further reading -- Exercises -- Chapter 4: Styling and Animating -- Modifying CSS with inline properties -- Setting computed style property values -- Using vendor-specific style properties -- Hiding and showing elements -- Effects and duration -- Speeding in -- Fading in and fading out -- Sliding up and sliding down -- Toggling visibility -- Creating custom animations -- Building effects by hand -- Animating multiple properties at once -- Positioning with CSS -- Simultaneous versus queued effects -- Working with a single set of elements -- Bypassing the queue -- Queuing effects manually -- Working with multiple sets of elements -- Queuing with callbacks -- In a nutshell -- Summary -- Further reading -- Exercises -- Chapter 5: Manipulating the DOM -- Manipulating attributes and properties -- Non-class attributes -- Value callbacks -- Data attributes -- DOM element properties -- The value of form controls -- DOM tree manipulation -- The () function revisited -- Creating new elements -- Inserting new elements -- Moving elements -- Wrapping elements -- Explicit iteration -- Using inverted insertion methods -- Copying elements -- Cloning for pull quotes -- Content getter and setter methods -- DOM manipulation methods in a nutshell -- Summary -- Further reading -- Exercises -- Chapter 6: Sending Data with Ajax -- Loading data on demand -- Appending HTML -- Working with JavaScript objects -- Retrieving JSON -- Using global jQuery functions -- Executing a script -- Loading an XML document -- Choosing a data format -- Passing data to the server -- Performing a GET request -- Serializing a form -- Keeping an eye on the request -- Error handling -- Ajax and events -- Deferreds and promises -- Performing Ajax calls on page load -- Using fetch() -- Summary
  • Exercises -- Chapter 13: Advanced Ajax -- Implementing progressive enhancement with Ajax -- Harvesting JSONP data -- Handling Ajax errors -- Using the jqXHR object -- Ajax promises -- Caching responses -- Throttling Ajax requests -- Extending Ajax capabilities -- Data type converters -- Adding Ajax prefilters -- Defining alternate transports -- Summary -- Further reading -- Exercises -- Appendix A: Testing JavaScript with QUnit -- Downloading QUnit -- Setting up the document -- Organizing tests -- Adding and running tests -- Asynchronous testing -- Other types of tests -- Practical considerations -- Further reading -- Summary -- Appendix B: Quick Reference -- Selector expressions -- Simple CSS -- Position among siblings -- Position among matched elements -- Attributes -- Forms -- Miscellaneous selectors -- DOM traversal methods -- Filtering -- Descendants -- Siblings -- Ancestors -- Collection manipulation -- Working with selected elements -- Event methods -- Binding -- Shorthand binding -- Triggering -- Shorthand triggering -- Utility -- Effect methods -- Predefined effects -- Custom animations -- Queue manipulation -- DOM manipulation methods -- Attributes and properties -- Content -- CSS -- Dimensions -- Insertion -- Replacement -- Removal -- Copying -- Data -- Ajax methods -- Issuing requests -- Request monitoring -- Configuration -- Utilities -- Deferred objects -- Object creation -- Methods of deferred objects -- Methods of promise objects -- Miscellaneous properties and functions -- Properties of the jQuery object -- Arrays and objects -- Object introspection -- Other -- Index
  • Further reading -- Exercises -- Chapter 7: Using Plugins -- Using a plugin -- Downloading and referencing the Cycle plugin -- Calling a plugin method -- Specifying plugin method parameters -- Modifying parameter defaults -- Other types of plugins -- Custom selectors -- Global function plugins -- The jQuery UI plugin library -- Effects -- Color animations -- Class animations -- Advanced easing -- Additional effects -- Interaction components -- Widgets -- jQuery UI ThemeRoller -- The jQuery Mobile plugin library -- HTML5 custom data attributes -- Mobile navigation -- Delivering multiple pages in one document -- Interactive elements -- List views -- Toolbar buttons -- Advanced features -- Summary -- Exercises -- Chapter 8: Developing Plugins -- Using the dollar () alias in plugins -- Adding new global functions -- Adding multiple functions -- Extending the global jQuery object -- Isolating functions within namespaces -- Adding jQuery object methods -- Object method context -- Implicit iteration -- Enabling method chaining -- Providing flexible method parameters -- Options objects -- Default parameter values -- Callback functions -- Customizable defaults -- Creating plugins with the jQuery UI widget factory -- Creating a widget -- Destroying widgets -- Enabling and disabling widgets -- Accepting widget options -- Adding methods -- Triggering widget events -- Plugin design recommendations -- Distributing a plugin -- Summary -- Exercises -- Chapter 9: Advanced Selectors and Traversing -- Selecting and traversing revisited -- Dynamic table filtering -- Striping table rows -- Combining filtering and striping -- More selector and traversal methods -- Customizing and optimizing selectors -- Writing a custom selector plugin -- Selector performance -- Sizzle selector implementation -- Testing selector speed -- DOM traversal under the hood
  • jQuery traversal properties -- The DOM element stack -- Writing a DOM traversal method plugin -- DOM traversal performance -- Improving performance using chaining -- Improving performance with caching -- Summary -- Further reading -- Exercises -- Chapter 10: Advanced Events -- Revisiting events -- Loading additional pages of data -- Displaying data on hover -- Event delegation -- Using jQuery's delegation capabilities -- Choosing a delegation scope -- Delegating early -- Defining custom events -- Infinite scrolling -- Custom event parameters -- Throttling events -- Other ways to perform throttling -- Extending events -- More about special events -- Summary -- Further reading -- Exercises -- Chapter 11: Advanced Effects -- Animation revisited -- Observing and interrupting animations -- Determining the animation state -- Halting a running animation -- Caution when halting animations -- Using global effect properties -- Disabling all effects -- Defining effect durations -- Multi-property easing -- Using deferred objects -- Animation promises -- Taking fine-grained control of animations -- Summary -- Further reading -- Exercises -- Chapter 12: Advanced DOM Manipulation -- Sorting table rows -- Sorting tables on the server -- Sorting tables using Ajax -- Sorting tables within the browser -- Moving and inserting elements revisited -- Adding links around existing text -- Sorting simple JavaScript arrays -- Sorting DOM elements -- Storing data alongside DOM elements -- Performing additional pre-computation -- Storing non-string data -- Alternating sort directions -- Using HTML5 custom data attributes -- Sorting and building rows with JSON -- Modifying the JSON object -- Rebuilding content on demand -- Revisiting attribute manipulation -- Using shorthand element creation syntax -- DOM manipulation hooks -- Writing a CSS hook -- Summary -- Further reading