Web Development with jQuery®

(Elliott) #1

xv


CONTENTS



  • APPENDIX A Exercise Answers ▸ PART IV APPENDICES

  • APPENDIX B jQuery Selectors

  • APPENDIX C Selecting, Traversing, and Filtering

  • APPENDIX D Events

  • APPENDIX E Manipulating Content, Attributes, and Custom Data

  • APPENDIX F More Content Manipulation

  • APPENDIX G AJAX Methods

  • APPENDIX H CSS

  • APPENDIX I Utilities

  • APPENDIX J Draggable and Droppable

  • APPENDIX K Sortable

  • APPENDIX L Selectable

  • APPENDIX M Animation and Easing Effects

  • APPENDIX N Accordion

  • APPENDIX O Datepicker

  • APPENDIX P Dialog

  • APPENDIX Q Tabs.

  • APPENDIX R Resizable

  • APPENDIX S Slider

  • APPENDIX T Tablesorter

  • APPENDIX U MediaElement

  • INDEX

  • CHAPTER 1: INTRODUCTION TO JQUERY PART I: THE JQUERY API

  • What jQuery Can Do for You

  • Who Develops jQuery?

  • Obtaining jQuery

  • Installing jQuery

  • Programming Conventions

  • Markup and CSS Conventions

  • JavaScript Conventions

  • Summary

  • CHAPTER 2: SELECTING AND FILTERING

  • The Origin of the Selectors API

  • Using the Selectors API

  • Filtering a Selection

  • Working Within the Context of a Selection

  • Working with an Element’s Relatives

  • Slicing a Selection

  • Adding to a Selection

  • Summary

  • CHAPTER 3: EVENTS

  • The Various Event Wrapper Methods

  • Attaching Other Events

  • Attaching Persistent Event Handlers

  • Removing Event Handlers

  • Creating Custom Events

  • Summary

  • CHAPTER 4: MANIPULATING CONTENT AND ATTRIBUTES

  • Setting, Retrieving, and Removing Attributes

  • Setting Multiple Attributes

  • Manipulating Class Names

  • Manipulating HTML and Text Content ftoc.indd 02/19/2015 Page xii

  • Getting, Setting, and Removing Content

  • Appending and Prepending Content

  • Inserting Beside Content

  • Inserting Beside Content via a Selection

  • Wrapping Content

  • Replacing Elements

  • Removing Content

  • Cloning Content

  • Summary

  • CHAPTER 5: ITERATION OF ARRAYS AND OBJECTS

  • Enumerating Arrays

  • Enumerating Objects

  • Iterating a Selection

  • Filtering Selections and Arrays

  • Filtering a Selection

  • Filtering a Selection with a Callback Function

  • Filtering an Array

  • Mapping a Selection or an Array

  • Mapping a Selection

  • Mapping an Array

  • Array Utility Methods

  • Making an Array

  • Finding a Value Within an Array

  • Merging Two Arrays

  • Summary

  • CHAPTER 6: CSS

  • Working with CSS Properties

  • jQuery’s Pseudo-Classes

  • Obtaining Outer Dimensions

  • Summary

  • CHAPTER 7: AJAX

  • Making a Server Request

  • What’s the Difference Between GET and POST?

  • RESTful Requests

  • Formats Used to Transport Data with an AJAX Request

  • Making a GET Request with jQuery

  • Loading HTML Snippets from the Server ftoc.indd 02/19/2015 Page xiii

  • Dynamically Loading JavaScript

  • AJAX Events

  • Using AJAX Event Methods

  • Attaching AJAX Events to Individual Requests

  • Sending a REST Request

  • Summary

  • CHAPTER 8: ANIMATION AND EASING EFFECTS

  • Showing and Hiding Elements

  • Sliding Elements

  • Fading Elements

  • Custom Animation

  • Animation Options

  • Summary

  • CHAPTER 9: PLUGINS

  • Writing a Plugin

  • Writing a Simple jQuery Plugin

  • Inspecting the Document Object Model

  • Writing a Context Menu jQuery Plugin

  • Good Practice for jQuery Plugin Development

  • Summary

  • CHAPTER 10: SCROLLBARS

  • Getting the Position of a Scrollbar

  • within a Scrolling
    Scrolling to a Particular Element

  • Scrolling to the Top

  • Summary

  • CHAPTER 11: HTML5 DRAG AND DROP

  • Implementing Drag and Drop

  • Prerequisite Plugins

  • Event Setup

  • Implementing Drag-and-Drop File Uploads

  • Adding the File Information Data Object

  • Using a Custom XMLHttpRequest Object

  • Additional Utilities

  • Summary

  • CHAPTER 12: DRAGGABLE AND DROPPABLE PART II: JQUERY UI

  • Making Elements Draggable

  • Delegating Drop Zones for Draggable Elements

  • Summary

  • CHAPTER 13: SORTABLE

  • Making a List Sortable

  • Customizing Sortable

  • Saving the State of Sorted Lists

  • Summary

  • CHAPTER 14: SELECTABLE

  • Introducing the Selectable Plugin

  • Summary

  • CHAPTER 15: ACCORDION

  • Building an Accordion UI

  • Changing the Default Pane

  • Changing the Accordion Event

  • Setting the Header Elements

  • Summary

  • CHAPTER 16: DATEPICKER

  • Implementing a Datepicker

  • Custom Styling the Datepicker

  • Setting the Range of Allowed Dates

  • Localizing the Datepicker

  • Setting the Date Format

  • Localizing Datepicker Text

  • Changing the Starting Weekday

  • Summary

  • CHAPTER 17: DIALOG

  • Implementing a Dialog

  • Styling a Dialog

  • Making a Modal Dialog

  • Auto-Opening the Dialog

  • Controlling Dynamic Interaction ftoc.indd 02/19/2015 Page xv

  • Animating the Dialog

  • Working with Dialog Events

  • Summary

  • CHAPTER 18: TABS

  • Implementing Tabs

  • Styling the Tabbed User Interface

  • Loading Remote Content via AJAX

  • Animating Tab Transitions

  • Summary

  • CHAPTER 19: TABLESORTER PART III: POPULAR THIRD-PARTY JQUERY PLUGINS

  • Sorting a Table

  • Summary

  • CHAPTER 20: CREATING AN INTERACTIVE SLIDESHOW

  • Creating a Slideshow

  • Summary

  • AND VIDEO CHAPTER 21: WORKING WITH HTML5 AUDIO

  • Downloading the MediaElement Plugin

  • Confi guring the MediaElement Plugin

  • Plugins for Older Browsers Creating an HTML Structure That Enables Fallback Video/Audio

  • Implementing h.264 Video Content

  • Customizing Player Controls

  • Controlling When the Download of Media Begins

  • Summary

  • CHAPTER 22: CREATING A SIMPLE WYSIWYG EDITOR

  • contenteditable Attribute Making an Element Editable with the

  • Font, and Font Size Creating Buttons to Apply Bold, Italic, Underline,

  • Creating a Selection

  • Storing a Selection

Free download pdf