Book Image

Learning jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques

Book Image

Learning jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques

Overview of this book

Table of Contents (18 chapters)
Learning jQuery
Credits
About the Authors
About the Reviewers
Preface

Finding Plug-in Documentation


The jquery.com Plugin Repository at http://jquery.com/Plugins/ is a great place to start when looking for documentation. Each plug-in listed in the repository has a link to a page from which the plug-in can be downloaded. Additionally, many of the linked pages contain demos, example code, and tutorials to help us get started.

Official jQuery plug-ins also provide ample comments in the source code itself. For many plug-ins, the comment syntax matches the comments of the jquery.js file, providing a description and at least one example of each method. This means that the tools available for viewing jQuery documentation also work with compliant plug-ins.

For example, the .offset method of the Dimensions plug-in has these comments:

 /**
  * Returns the location of the element in pixels from the top left
  * corner of the viewport.
  *
  * For accurate readings make sure to use pixel values for margins,
  * borders and padding.
  *
  * @example $("#testdiv").offset(...