... 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 fu...
... elements 1 35
Showing and hiding elements gradually 1 35
■
Fading elements
into and out of existence 140
■
Sliding elements up and
down 143
■
Stopping animations 1 45
5.3 Creating custom ... 176
6.4 Dynamically loading scripts 180
6 .5 Summary 184
7
Extending jQuery with custom plugins 1 85
7.1 Why extend? 186
7.2 The jQuery plugin authoring guidelines 187
Naming files and...
... 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
insertAf...
... 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 offer.
5. 1 Showing ... 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 implementi...
... exploring
the operation of the jQuery effects in file chapter5/lab.effects.html.
Loading this page into your browser results in the display shown in figure 5. 4.
This lab page consists of two main ... </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 s...
... 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, ... settings.transformer(settings.thumbnails[index].src));
settings.current = index;
};
}) (jQuery) ;
Boy, it seemed longer than 45 lines when we were working through it, didn’t it?
This plugin is...
... 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...