... loaded.
The jQuery plugin authoring guidelines 187
of this chapter, we’ll examine the guidelines and patterns that allow us to create
jQuery plugins and we’ll create a few of our own. In the following ... in use later in this chapter and in jQuery
functions that will be introduced in chapter 8. But for now, let’s finally look at how
we extend jQuery with our own utility...
... custom plugins 185
7.1 Why extend? 186
7.2 The jQuery plugin authoring guidelines 187
Naming files and functions 187
■
Beware the $ 189
Taming complex parameter lists 190
7.3 Writing custom ... 199
Applying multiple operations in a wrapper method 201
Retaining state within a wrapper method 206
7.5 Summary 216
8
Talk to the server with Ajax 217
8. 1 Brushing up on Ajax 2 18
Cre...
... function in section 7.2.
1.4 Summary
In this whirlwind introduction to jQuery we’ve covered a great deal of material in
preparation for diving into using jQuery to quickly and easily enable Rich Inter-
net ... enterprising jQuery users have extended jQuery with sets of useful
functions that are known as plugins. We’ll be talking more about extending jQuery
in this way, as...
... used within a jQuery chain of operations.
In addition to finding elements in a wrapped set that match a selector, jQuery
also provides a method to find elements that contain a specified string. ... that results in a jQuery wrapped set.
Because of the way jQuery chaining works, this expression can also include com-
mands, making this a powerful Lab for examining the operations...
... dimensions
in this area
56 CHAPTER 3
Bringing pages to life with jQuery
previous format of
attr()
; the function is invoked for each individual element in
the matched set.
WARNING Internet Explorer ... before clicking Execute.
■
before()
and
insertBefore()
—Insert the element before the destination
elements instead of before the destination’s first child.
■
after()
and
insertAft...
... Summary
Building upon the jQuery knowledge that we’ve gained so far, this chapter intro-
duced us to the world of event handling.
We learned that there are vexing challenges to implementing event handling ... reaction
than we intended. Be mindful that effects should be used to enhance the usability
of a page, not hinder it.
With that caution in mind, let’s see what jQuery has to off...
... </body>
</html>
In this document, we import jQuery, which (as we know) defines the global names
jQuery
and its alias
$
. We then redefine the global
$
name to a string value
b
,
overriding the jQuery ... covers
■
The jQuery browser detection flags
■
Using other libraries with jQuery
■
Functions for manipulating arrays
■
Extending and merging objects
■
Dynamically l...
... identified the following pain points that
page authors using Ajax need to deal with:
Loading content into elements 229
8. 2.2 Loading dynamic inventory data
Often in business applications, ... various points or conditions during an Ajax call. We’ll be discussing them
in detail in section 8. 8. If omitted, the default is to enable the triggering of
global functions.
contentType S...
... optionally, margins.
Command syntax: innerWidth and innerHeight
innerWidth()
innerHeight()
Returns the inner width or height of the first element in the wrapped set. The inner dimen-
sion includes ... not surprising
that many jQuery plugins focus on enabling rich user interfaces. In this section,
we’ll introduce the official
UI Plugin, an important and recent addition to the
jQuery...