You are previewing jQuery UI 1.7.
O'Reilly logo
jQuery UI 1.7

Book Description

Build highly interactive web applications with ready-to-use widgets from the jQuery User Interface library

  • Organize your interfaces with reusable widgets: accordions, date pickers, dialogs, sliders, tabs, and more

  • Enhance the interactivity of your pages by making elements drag-and-droppable, sortable, selectable, and resizable

  • Packed with examples and clear explanations of how to easily design elegant and powerful front-end interfaces for your web applications

  • Revised and targeted at jQuery UI 1.7

In Detail

Modern web application user interface design requires rapid development and proven results. jQuery UI, a trusted suite of official plug-ins for the jQuery JavaScript library, gives you a solid platform on which to build rich and engaging interfaces with maximum compatibility and stability, and minimum time and effort.

jQuery UI has a series of ready-made, great-looking user interface widgets and a comprehensive set of core interaction helpers designed to be implemented in a consistent and developer-friendly way. With all this, the amount of code that you need to write personally to take a project from conception to completion is drastically reduced.

Specially revised for version 1.7 of jQuery UI, this book has been written to maximize your experience with the library by breaking down each component and walking you through examples that progressively build upon your knowledge, taking you from beginner to advanced usage in a series of easy-to-follow steps.

In this book, you'll learn how each component can be initialized in a basic default implementation and then see how easy it is to customize its appearance and configure its behavior to tailor it to the requirements of your application. You'll look at the configuration options and the methods exposed by each component's API to see how these can be used to bring out the best of the library.

Events play a key role in any modern web application if it is to meet the expected minimum requirements of interactivity and responsiveness, and each chapter will show you the custom events fired by the component covered and how these events can be intercepted and acted upon.

Table of Contents

  1. jQuery UI 1.7
    1. jQuery UI 1.7
    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. Introducing jQuery UI
      1. Downloading the library
      2. Setting up a development environment
      3. The structure of the library
      4. ThemeRoller
      5. Component categories
      6. Browser support
      7. Book examples
      8. Library licensing
      9. API introduction
        1. Events and callbacks
        2. Callback arguments
      10. Summary
    7. 2. The CSS Framework
      1. The files that make up the framework
        1. ui.all.css
        2. ui.base.css
        3. ui.core.css
        4. The individual component framework files
        5. ui.theme.css
        6. Linking to the required framework files
      2. Using the framework classes
        1. Containers
        2. Interactions
        3. Icons
        4. Interaction cues
      3. Switching themes quickly and easily
      4. Overriding the theme
      5. Summary
    8. 3. Tabs
      1. A basic tab implementation
      2. Tab CSS framework classes
      3. Applying a custom theme to the tabs
      4. Configurable options
        1. Selecting a tab
        2. Disabling a tab
        3. Transition effects
        4. Collapsible tabs
      5. Tab events
        1. Binding to events
      6. Using tab methods
        1. Enabling and disabling tabs
        2. Adding and removing tabs
        3. Simulating clicks
        4. Creating a tab carousel
        5. Getting and setting options
      7. AJAX tabs
      8. Displaying data obtained via JSONP
      9. Summary
    9. 4. The Accordion Widget
      1. Accordion's structure
      2. Styling the accordion
      3. Configuring an accordion
        1. Changing the trigger event
        2. Changing the default active header
        3. Filling the height of its container
        4. Accordion animation
      4. Accordion events
        1. The changestart event
      5. Accordion navigation
      6. Accordion methods
        1. Destruction
        2. Header activation
      7. Accordion interoperability
      8. A del.icio.us accordion
      9. Summary
    10. 5. The Dialog
      1. A basic dialog
      2. Dialog options
        1. Showing the dialog
        2. Positioning the dialog
        3. The title of the dialog
        4. Modality
        5. Adding buttons
        6. Enabling dialog animations
        7. Fixing IE6
        8. Configuring the dialog's dimensions
        9. Stacking
      3. Dialog's event model
      4. Controlling a dialog programmatically
        1. Toggling the dialog
      5. Getting data from the dialog
      6. Dialog interoperability
      7. A dynamic image-based dialog
      8. Summary
    11. 6. Slider
      1. Implementing a slider
      2. Custom styling
      3. Configurable options
        1. Creating a vertical slider
        2. Minimum and maximum values
        3. Slider steps
        4. Slider animation
        5. Setting the slider's value
        6. Using multiple handles
        7. The range element
      4. Using slider's event API
      5. Slider methods
      6. Future uses
      7. A color slider
      8. Summary
    12. 7. Datepicker
      1. The default datepicker
      2. Configurable options of the picker
        1. Basic Options
        2. Minimum and maximum dates
        3. Changing the datepicker UI
        4. Adding a trigger button
        5. Configuring alternative animations
        6. Multiple months
        7. Changing the date format
        8. Updating an additional input element
        9. Localization
        10. Callback properties
      3. Utility methods
      4. Date picking methods
        1. Selecting a date programmatically
        2. Showing the datepicker in a dialog
      5. An AJAX datepicker
      6. Summary
    13. 8. Progressbar
      1. The default progressbar implementation
      2. Using progressbar's configuration option
      3. Progressbar's event API
      4. Progressbar methods
      5. User initiated progress
      6. Rich uploads with progressbar
      7. Summary
    14. 9. Drag and Drop
      1. The deal with drag and droppables
      2. Draggables
        1. A basic drag implementation
      3. Configuring draggable options
        1. Using the configuration options
        2. Resetting dragged elements
        3. Drag handles
        4. Helper elements
        5. Constraining the drag
        6. Snapping
      4. Draggable event callbacks
      5. Using draggable's methods
      6. Droppables
      7. Configuring droppables
        1. Tolerance
      8. Droppable event callbacks
        1. Scope
        2. Greedy
      9. Droppable methods
      10. A drag and drop game
      11. Summary
    15. 10. Resizing
      1. A basic resizable
      2. Resizable options
        1. Configuring resize handles
        2. Adding additional handle images
        3. Defining size limits
        4. Resize ghosts
        5. Containing the resize
        6. Handling the aspect ratio
        7. Resizable animations
        8. Simultaneous resizing
        9. Preventing unwanted resizes
      3. Resizable callbacks
      4. Resizable methods
      5. Resizable tabs
      6. Summary
    16. 11. Selecting
      1. Basic implementation
      2. Selectee class names
      3. Configurable options of the selectable component
        1. Filtering selectables
        2. Cancelling the selection
      4. Selectable callbacks
        1. Working with vast amounts of selectables
      5. Selectable methods
      6. A selectable image viewer
        1. Styling the image selector
      7. Summary
    17. 12. Sorting
      1. The default implementation
      2. Configuring sortable options
        1. Placeholders
        2. Sortable helpers
        3. Sortable items
        4. Connected lists
      3. Reacting to sortable events
      4. Connected callbacks
      5. Sortable methods
      6. Widget compatibility
        1. Adding draggables
      7. Sortable page widgets
        1. The underlying page
        2. Styling the page
        3. The main script
        4. Building the content boxes
        5. Writing the cookie
        6. Making the boxes sortable
        7. Closing and restoring boxes
      8. Summary
    18. 13. UI Effects
      1. The core effects file
        1. Using color animations
        2. Using class transitions
        3. Advanced easing
      2. Highlighting specified elements
        1. Additional effect arguments
      3. Bouncing
      4. Shaking an element
      5. Transferring an element's outline
      6. Element scaling
      7. Element explosion
      8. The puff effect
      9. The pulsate effect
      10. Dropping elements onto the page
      11. Sliding elements open or closed
      12. The window-blind effect
      13. Clipping elements
      14. Folding elements
      15. Summary