Book Image

jQuery 1.4 Reference Guide

By : Jonathan Chaffer, Karl Swedberg, jQuery Foundation
Book Image

jQuery 1.4 Reference Guide

By: Jonathan Chaffer, Karl Swedberg, jQuery Foundation

Overview of this book

If you are looking for a comprehensive reference guide to this popular JavaScript library, this book and eBook is for you. To make optimal use of jQuery, it's good to keep in mind the breadth of capabilities it provides. You can add dynamic, interactive elements to your sites with reduced development time using jQuery.Revised and updated for version 1.4 of jQuery, this book offers an organized menu of every jQuery method, function, and selector. Each method and function is introduced with a summary of its syntax and a list of its parameters and return value, followed by a discussion, with examples where applicable, to assist in getting the most out of jQuery and avoiding the pitfalls commonly associated with JavaScript and other client-side languages.In this book you will be provided information about the latest features of jQuery that include Sizzle Selector, Native event delegation, Event triggering, DOM manipulation, and many more. You won't be confined to built-in functionality, you'll be able to examine jQuery's plug-in architecture and we discuss both how to use plug-ins and how to write your own. If you're already familiar with JavaScript programming, this book will help you dive right into advanced jQuery concepts. You'll be able to experiment on your own, trusting the pages of this book to provide information on the intricacies of the library, where and when you need it.This book is a companion to Learning jQuery 1.3. Learning jQuery 1.3 begins with a tutorial to jQuery, where the authors share their knowledge, experience, and enthusiasm about jQuery to help you get the most from the library and to make your web applications shine.jQuery 1.4 Reference Guide digs deeper into the library, taking you through the syntax specifications and following up with detailed discussions. You'll discover the untapped possibilities that jQuery 1.4 makes available, and polish your skills as you return to this guide time and again.
Table of Contents (19 chapters)
jQuery 1.4 Reference Guide
Credits
About the Authors
About the Reviewers
Preface
Index

JavaScript code compressors


When putting the finishing touches on a site, it is often advisable to minify the JavaScript code. This process reduces download time for all users of the site, especially when coupled with server-side compression.

JSMin

Created by Douglas Crockford, JSMin is a filter that removes comments and unnecessary whitespaces from JavaScript files. It typically reduces file size by half, resulting in faster downloads, especially when combined with server-based file compression. Some web sites host the tool to allow users to minify their code by pasting it into a textarea. JSMin can be downloaded as an MS-DOS .exe file or as source code written in a variety of programming languages: http://www.crockford.com/javascript/jsmin.html.

YUI Compressor

The YUI Compressor is "designed to be 100% safe and yield a higher compression ratio than most other tools". As of version 2.0, it is also able to minify CSS files. It requires Java version 1.4 or greater: http://developer.yahoo.com/yui/compressor/.

Google Closure Compiler

This new service from Google performs a similar compression to JSMin, and in some tests has been found to achieve a higher degree of compression. The compiler is available as both a standalone application and an on-demand API.

This tool also integrates a JavaScript syntax checker that warns of possible errors and code defects: http://code.google.com/closure/compiler/.

Packer

This JavaScript compressor/obfuscator by Dean Edwards was used to compress the source code of previous versions of jQuery. The tool is available as a web-based tool or as a free download. The resulting code is very efficient in file size at a cost of a small increase in execution time. Although it is no longer officially recommended, it may be a legitimate option when server-side file compression is not available:

http://dean.edwards.name/packer/

http://dean.edwards.name/download/#packer