You are previewing jQuery 1.3 with PHP.
O'Reilly logo
jQuery 1.3 with PHP

Book Description

For PHP developers, this intro to jQuery has it all. It will empower your applications with new responsive capabilities and custom-built plugins. You’ll be amazed at the difference a few lines of JavaScript can make.

  • Combine client-side jQuery with your server-side PHP to make your applications more efficient and exciting for the client

  • Learn about some of the most popular jQuery plugins and methods

  • Create powerful and responsive user interfaces for your PHP applications

  • Complete examples of PHP and jQuery with clear explanations

  • No JavaScript expertise or jQuery experience required

  • In Detail

    To make PHP applications that respond quickly, avoid unnecessary page reloads, and provide great user interfaces, often requires complex JavaScript techniques and even then, if you get that far, they might not even work across different browsers! With jQuery, you can use one of the most popular JavaScript libraries, forget about cross-browser issues, and simplify the creation of very powerful and responsive interfaces – all with the minimum of code.This is the first book in the market that will ease the server-side PHP coder into the client-side world of the popular jQuery JavaScript library.

    This book will show you how to use jQuery to enhance your PHP applications, with many examples using jQuery's user interface library jQuery UI, and other examples using popular jQuery plugins. It will help you to add exciting user interface features to liven up your PHP applications without having to become a master of client-side JavaScript.

    This book will teach you how to use jQuery to create some really stunning effects, but without you needing to have in-depth knowledge of how jQuery works. It provides you with everything you need to build practical user interfaces for everything from graphics manipulation to drag-and-drop to data searching, and much more. The book also provides practical demonstrations of PHP and jQuery and explains those examples, rather than starting from how JavaScript works and how it is different from PHP.

    By the end of this book, you should be able to take any PHP application you have written, and transform it into a responsive, user-friendly interface, with capabilities you would not have dreamed of being able to achieve, all in just a few lines of JavaScript.

    Table of Contents

    1. jQuery 1.3 with PHP
      1. jQuery 1.3 with PHP
      2. Credits
      3. About the Author
      4. About the Reviewers
      5. 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. Errata
          2. Piracy
          3. Questions
      6. 1. Introduction and Overview
        1. Expected developer skills
        2. Differences between PHP and JavaScript
        3. What is jQuery?
        4. Why jQuery?
        5. How does jQuery fit in with PHP?
        6. How to work with the examples
        7. Projects that use PHP and jQuery
          1. WordPress
          2. RoundCube
          3. KFM
          4. Drupal
        8. Summary
      7. 2. Quick Tricks
        1. Dynamic select boxes
          1. Client-side code
            1. How it works
          2. Server-side code
        2. Quick deletes
          1. Client-side code
          2. Server-side code
        3. Contextual help
        4. Inline editing
          1. Client-side code
          2. Server-side code
        5. Summary
      8. 3. Tabs and Accordions
        1. Using a jQuery tab plugin
          1. Client-side code
          2. Server-side considerations
        2. Using jQuery accordion plugins
          1. Client-side code
        3. Server-side management of accordions
          1. Client-side code
          2. Server-side code
            1. Just the conversion
            2. Now show the data with the accordions
        4. Server-side management of tabs
          1. Server-side code
            1. Just the conversion
            2. Now show the data with the tabs
        5. Using special codes to define tabs
          1. Client-side code
          2. Server-side code
        6. Loading accordion panels through Ajax
          1. Client-side code
          2. Server-side code
        7. Loading tab panels through Ajax
          1. Client-side code
        8. Summary
      9. 4. Forms and Form Validation
        1. Using the jQuery validation plugin
          1. Client-side code
        2. Setting up jQuery validation from PHP
          1. Server-side code (setup)
          2. Client-side code
          3. Server-side code
        3. Remote validation
          1. Server-side code (setup)
          2. Client-side code
          3. Server-side code
        4. Large select boxes
          1. Client-side code
          2. Server-side code
        5. Auto-suggestion
          1. Client-side code
          2. Server-side code
          3. Client-side code
        6. Summary
      10. 5. File Management
        1. Security
        2. Choosing a directory
          1. Client-side code
          2. Server-side code
        3. Creating, renaming, and deleting directories
          1. Client-side code
          2. Server-side code
        4. Moving directories
          1. Client-side code
          2. Server-side code
        5. File uploads
          1. Client-side code
          2. Server-side code
        6. Renaming, deleting, and moving files
          1. Client-side code
          2. Server-side code
        7. File downloads
          1. Client-side code
          2. Server-side code
        8. Summary
      11. 6. Calendars
        1. Displaying the calendar
        2. Creating an event
          1. Client-side code
          2. Server-side code
        3. Loading events from the server
          1. Client-side code
          2. Server-side code
        4. Moving and resizing events
          1. Client-side code
          2. Server-side code
        5. Editing events
          1. Client-side code
          2. Server-side code
        6. Deleting events
          1. Client-side code
          2. Server-side code
        7. Walk-through of the calendar so far
        8. Recurring events
          1. Client-side code
          2. Server-side code
        9. Deleting recurring events
          1. Client-side code
          2. Server-side code
        10. Summary
      12. 7. Image Manipulation
        1. Showing the list of images
          1. Server-side code
          2. Client-side code
        2. Selecting an image
          1. Client-side code
          2. Server-side code
        3. Preparing your PHP
        4. Rotating
          1. Client-side code
          2. Server-side code
        5. Caching or saving the image
          1. Client-side code
          2. Server-side code
        6. Resizing
          1. Client-side code
          2. Server-side code
        7. Cropping
          1. Client-side code
          2. Server side
        8. Summary
      13. 8. Drag and Drop
        1. Sorting simple lists
          1. Client-side code
          2. Server-side code
          3. Client-side code
        2. Sorting trees
          1. Client-side code
          2. Server-side code
        3. Connecting lists
          1. Client-side code
          2. Server-side code
        4. Summary
      14. 9. Data Tables
        1. Setting up DataTables
          1. Client-side code
        2. Getting data from the server
          1. Client-side code
          2. Server-side code
        3. Caching your database queries
          1. Server-side code
        4. Pagination through Ajax
          1. Client-side code
          2. Server-side code
        5. Sorting by column
        6. Filtering
          1. Server-side code
        7. Setting a delay on the filter
        8. Summary
      15. 10. Optimization
        1. Optimizing the page load
          1. Place scripts at the bottom
          2. Aggregate and cache your scripts
          3. Output HTML similar to the post-jQuery code
        2. Optimizing development and maintenance
          1. Writing your own plugins
          2. Un-caching your JavaScript
        3. Optimizing jQuery
          1. Use Google's CDN
          2. Caching jQuery objects
          3. Use $.load for non-visual code
        4. JavaScript optimizations
          1. Chaining
          2. Speeding up selectors
          3. Inject multiple elements at once
          4. Using setTimeout
          5. Use var for your variables
        5. Summary