Web Development with jQuery®

(Elliott) #1

fl ast.indd 02/19/2015 Page xix


INTRODUCTION


JQUERY HAS BECOME ESSENTIAL in the world of web development. jQuery’s mission as a JavaScript
library is simple: It strives to make the lives of web developers easier by making many tasks much
easier. jQuery began as a library to patch cross-browser inconsistencies, to make developing in
JavaScript easier, while it still provides a lot of cross-browser normalization. As browsers have
advanced and fi lled in holes in compatibility, jQuery has become leaner, more effi cient, and better at
fulfi lling the task of providing an API that makes developing JavaScript easier.

jQuery has the proven capability to reduce many lines of ordinary JavaScript to just a few lines,
and, in many cases, just a single line of jQuery-enabled JavaScript. The trade-off is including the
additional size and complexity of the jQuery library (and possibly additional related downloads) in
the materials your users need to obtain to use your website or application. This is less of a trade-off
today as more and more people have access to high-speed Internet. High-speed internet, although
still pathetic in the United States when compared to some other nations, has inched up in overall
speed. So, the additional download isn’t all that much when you consider the big picture.

jQuery strives to remove barriers in JavaScript development by removing redundancy wherever
possible. jQuery 1.9 and earlier focus more on normalizing cross-browser JavaScript development
in key areas where browsers would otherwise differ, such as Microsoft’s Event API and the W3C
Event API, and other, more remedial tasks such as getting the mouse cursor’s position when an event
has taken place. With the normalization efforts taking place in the browsers, jQuery 2.0 can shed
a great deal of legacy baggage that focused on bridging things such as event compatibility between
Internet Explorer and everyone else. Now, the latest version of Internet Explorer has the stan-
dard event API in strict standards rendering mode, so when you include the right Document Type
Declaration, there is no need to bridge event support.

jQuery 1.9 should be used if you need to work with older versions of Internet Explorer, such as IE8.
Both jQuery 1.9 and jQuery 2.0 work with all the modern browsers, including the latest versions of
Safari, Firefox, Google Chrome, and Internet Explorer.

Getting started with jQuery is easy—all you need to do is include a single script in your HTML or
XHTML documents to include the base jQuery JavaScript library. Throughout this book, jQuery’s
API (Application Programming Interface) components are demonstrated in detail and show you how
everything within this framework comes together to enable you to rapidly develop web applications.

This book also covers the jQuery UI library, which makes redundant user interface (UI) tasks on
the client side easier and more accessible to everyday web developers who might not have much
JavaScript programming expertise. The jQuery UI library includes widgets such as dialogs, tabs,
accordions, and a datepicker; for a complete demonstration, view the examples available at
http://www.jqueryui.com.

A large, thriving community of jQuery plugins is available for free, and a few of the most popular
are covered. In addition, you learn how to create your own jQuery plugins, from simple to complex.

http://www.it-ebooks.info

Free download pdf