You are previewing jQuery 2.0 Development Cookbook.
O'Reilly logo
jQuery 2.0 Development Cookbook

Book Description

As a web developer, you can benefit greatly from this book - whatever your skill level. Learn how to build dynamic modern websites using jQuery. Packed with recipes, it will quickly take you from beginner to expert.

In Detail

JQuery is one of the most popular JavaScript frameworks to have ever ruled the Web. It allows its developers to easily break away from static HTML and enables them to bring their sites into the modern era. With jQuery it is possible to quickly create rich interactive websites and web applications that work flawlessly across different platforms such as PC, tablets, mobile, and more.

jQuery 2.0 Development Cookbook is your go-to place for modern client-side web development solutions with detailed examples and reusable code. You will learn to use jQuery and build dynamic websites and web applications with a truly unique web experience using animations, effects, user interaction, and more.

This Cookbook's extensive and practical examples will guide you through jQuery basics all the way to create full-featured implementations. You will be shown how to add interactive and dynamic content to HTML websites and how to create cross-platform web applications.

With jQuery 2.0 Development Cookbook, you will learn everything you need to know to allow you to create modern web applications using jQuery, from the basics to complete features thanks to the detailed and practical examples.

What You Will Learn

  • Use jQuery and CSS to create more complete animations
  • Construct a mobile website and web app with jQuery Mobile
  • Create robust web forms for collecting user data with validation and user feedback
  • Build powerful user interface elements to provide an intuitive experience for your users
  • Add style to your interfaces with effects and basic animations
  • Utilize jQuery and AJAX to load content into pages without the need for refreshing
  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. jQuery 2.0 Development Cookbook
      1. Table of Contents
      2. jQuery 2.0 Development Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Document Object Model Manipulation
        1. Introduction
        2. Selecting elements
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Finding and selecting sibling elements
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Creating DOM elements
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Inserting content into an element
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Modifying the DOM element properties
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. Adding and removing CSS classes to dynamically change their style
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Enabling and disabling buttons by changing their properties
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Updating an image within a page
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more...
        10. Populating list elements
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        11. Understanding pagination
          1. Getting ready
          2. How to do it…
          3. How it works…
        12. Removing DOM elements
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        13. Re-using DOM elements
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      9. 2. Interacting with the User by Making Use of jQuery Events
        1. Introduction
        2. Detecting button clicks
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more...
          5. See also
        3. Detecting element clicks
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Detecting change
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more...
          5. See also
        5. Updating content based on user input
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Detecting key press events on inputs
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Restricting input character length
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more...
          5. See also
        8. Changing page elements on mouse hover
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        9. Triggering events manually
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more...
        10. Preventing event triggers
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        11. Creating a custom event
          1. Getting ready
          2. How to do it…
          3. How it works…
      10. 3. Loading and Manipulating Dynamic Content with AJAX and JSON
        1. Introduction
        2. Loading HTML from a web server into a page
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. PHP
            2. HTML
            3. CSS
            4. jQuery
          4. See also
        3. Using AJAX and handling server errors
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        4. Processing JSON data
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. PHP
            2. HTML
            3. jQuery
          4. See also
        5. Searching JavaScript objects
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Sorting JavaScript objects
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Caching JSON and AJAX requests
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. PHP
            2. HTML
            3. jQuery
          4. There's more…
        8. Creating a search feature
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. SQL
            2. PHP
            3. HTML
            4. CSS
            5. jQuery
          4. See also
        9. Creating an autosuggest feature
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. SQL and PHP
            2. HTML
            3. CSS
            4. jQuery
          4. There's more…
          5. See also
        10. Waiting for an AJAX response
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. HTML
            2. PHP
            3. jQuery
          4. See also
      11. 4. Adding Attractive Visuals with jQuery Effects
        1. Introduction
        2. Sliding page elements
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. HTML
            2. jQuery
            3. CSS
          4. There's more...
          5. See also
        3. Hiding and showing elements
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. HTML
            2. jQuery
          4. There's more…
          5. See also
        4. Fading elements
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. HTML
            2. CSS
            3. jQuery
          4. There's more…
          5. See also
        5. Toggling effects
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. HTML
            2. jQuery
          4. There's more…
        6. Stopping effects
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. HTML
            2. CSS
            3. jQuery
        7. Chaining effects
          1. How to do it…
          2. How it works…
          3. See also
        8. Creating a basic photo gallery
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. HTML
            2. CSS
            3. jQuery
        9. Creating a blinking button
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        10. Removing elements with effects
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      12. 5. Form Handling
        1. Introduction
        2. Implementing basic form validation
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. HTML
            2. CSS
            3. jQuery
          4. There's more...
          5. See also
        3. Adding number validation
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Adding credit card number validation
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Adding date validation
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Adding e-mail address validation
          1. How to do it…
          2. How it works…
          3. There's more…
        7. Implementing live form validation
          1. Getting ready
          2. How to do it…
          3. How it works…
        8. Adding a password strength indicator
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        9. Adding anti-spam measures
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        10. Implementing input character restrictions
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
      13. 6. User Interface
        1. Introduction
        2. Manipulating element CSS
          1. Getting ready
          2. How to do it…
          3. How it works…
        3. Creating a news ticker
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Creating sticky elements
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Implementing smooth scrolling
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Creating a dynamic table of contents
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Creating a basic drag-and-drop functionality
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Creating a dynamic animated tree menu
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        9. Creating an accordion content slider
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        10. Creating tabbed content
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        11. Creating a modal pop up
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        12. Creating a draggable content pop up
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      14. 7. User Interface Animation
        1. Introduction
        2. Creating an animated login form
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Adding photo zoom
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Creating an animated content slider
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Animating background images
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Creating an animated navigation menu
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      15. 8. Understanding Plugin Development
        1. Introduction
        2. Creating a plugin template
          1. Getting ready
          2. How to do it…
          3. How it works…
        3. Creating a tooltip plugin
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        4. Building a content and image slider plugin
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Creating an RSS feed reader plugin
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Coding an image cropper plugin from scratch
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. Image selection and preview
            2. Image crop plugin
            3. Image upload
            4. Cropping and saving the image with PHP
          4. There's more…
          5. See also
      16. 9. jQuery UI
        1. Introduction
        2. Creating stylish and functional buttons
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Creating dialog boxes for user information and input
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Implementing progress bars within your application
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Adding date picker interfaces to input boxes quickly
          1. Getting ready
          2. How to do it…
          3. How it works…
        6. Creating an autocomplete search feature
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      17. 10. Working with jQuery Mobile
        1. Introduction
        2. Creating a basic mobile website template
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Building a complete static website
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Building a dynamic mobile website
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Implementing the quick call functionality
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Implementing the send SMS functionality
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Adding mobile-friendly lists
          1. Getting ready
          2. How to do it…
          3. How it works…
        8. Using touch-oriented events
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Creating mobile-compatible forms
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. Text input
            2. Select menu
            3. Checkboxes and radio buttons
            4. Additional
          4. There's more…
        10. Building a complete registration and login system
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. HTML
            2. SQL
            3. PHP
            4. JavaScript
          4. There's more…
          5. See also
        11. Building a complete mobile web app
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. HTML
            2. SQL
            3. PHP
            4. JavaScript
          4. There's more…
          5. See also
      18. Index