jQuery in Action

Summary
15
separates style from structure, achieving better page organization and increased
code versatility.
Despite the fact that jQuery introduces only two new names in the JavaScript
namespace--the self-named
jQuery
function and its
$
alias--the library provides
a great deal of functionality by making that function highly versatile; adjusting
the operation that it performs based upon its parameters.
As we've seen, the
jQuery()
function can be used to do the following:
Select and wrap
DOM
elements to operate upon
Serve as a namespace for global utility functions
Create
DOM
elements from
HTML
markup
Establish code to be executed when the
DOM
is ready for manipulation
jQuery behaves like a good on-page citizen not only by minimizing it incursion
into the global JavaScript namespace, but also by providing an official means to
reduce that minimal incursion in circumstances when a name collision might still
occur, namely when another library such as Prototype requires use of the
$
name.
How's that for being user friendly?
You can obtain the latest version of jQuery from the jQuery site at http://
jquery.com/. The version of jQuery that the code in this book was tested against
(version 1.2.1) is included as part of the downloadable code.
In the chapters that follow, we'll explore all that jQuery has to offer us as page
authors of Rich Internet Applications. We'll begin our tour in the next chapter as
we bring our pages to life via
DOM
manipulation.


Другие страницы

 
Cкачать книги бесплатно без регистрации в электронном виде (pdf, chm, txt).Вы можете читать книги онлайн на нашем сайте литературного портала книг.Большая подборка учебников, пособий, интересных книг.Электронные книги на английском языке скачать бесплатно без смс.