Mindblown: a blog about philosophy.
-
Selecting elements for manipulation
The first thing you need to do when using virtually any jQuery method is to select some document elements to act upon. As you learned in lesson 1, to select elements in a page using jQuery, you need to pass the selector to the jQuery() function (or its alias $()). The jQuery() function and its alias return a jQuery object containing…
-
Selecting elements
This lesson covers In this lesson, we’ll examine in great detail how the DOM elements to be acted upon are identified by looking at one of the most powerful and frequently used capabilities of jQuery’s $() function: the selection of DOM elements via selectors. Throughout the pages of this lesson, you’ll become familiar with the plethora of selectors…
-
Conclusion
In this lesson we surveyed the features that jQuery provides outside of the methods that operate on a jQuery object. These included an assortment of functions, as well as a set of flags, defined directly on the jQuery top-level name (as well as its $ alias). First, you learned about the flags that deal with animations. Setting $.fx.off lets you completely…
-
Miscellaneous utility functions
This section will explore the set of utility functions that are pretty much a category on their own. We’ll start with one that doesn’t seem to do much. Doing nothing jQuery defines a utility function that does nothing, literally. This function could have been named $.uselessFunctionThatDoesNothing(), but that’s a tad long, so it’s named $.noop(). It’s defined…
-
Manipulating JavaScript objects and collections
The majority of jQuery features implemented as utility functions are designed to operate on JavaScript objects other than the DOM elements. Generally, anything designed to operate on the DOM is provided as a jQuery method. Although some of these functions can be used to operate on DOM elements—which are JavaScript objects, after all—the focus of the utility…
-
Using the jQuery properties
A few features that jQuery makes available to page authors are available not via methods or functions but as properties defined on $. In the past, several jQuery plugin authors have relied on these features to develop their plugins. But as will be evident in a few pages, some of them have been deprecated and their…
-
Beyond the DOM with jQuery utility functions
This lesson covers Up to this point, we’ve spent a number of lessons examining the jQuery methods that operate upon a set of DOM elements selected by using the $() function. But you may recall that way back in lesson 1 we also introduced the concept of utility functions—functions namespaced by jQuery/$ that don’t operate on a jQuery object. These functions could…
-
Conclusion
Ajax is a key part of modern applications, and jQuery is no slouch in providing a rich set of tools for you to work with. For loading HTML content into DOM elements, the load() method provides an easy way to grab the content from the server and make it the content of any set of matched elements.…
-
Taking full control of an Ajax request
The functions and methods you’ve seen so far are convenient for many cases, but there may be times when you want to take control of all the nitty-gritty details into your own hands. For example, you may want to be sure that each time your Ajax request is performed, you’ll receive fresh data (that is,…
-
Making GET and POST requests
The load() method makes either a GET or a POST request, depending on how the request parameter data (if any) is provided, but sometimes you want to have a bit more control over which HTTP method gets used. Why should you care? Because your server may care. Web authors have traditionally played fast and loose with the GET and POST methods,…
Got any book recommendations?