concept web page in category jQuery

appears as: web pages, web page, web page
jQuery in Action, Third Edition

This is an excerpt from Manning's book jQuery in Action, Third Edition.

This causes the defined code to execute after the document has fully loaded. Unfortunately, the browser not only delays executing the onload code until after the DOM tree is created but also waits until all external resources are fully loaded and the page is displayed in the browser window. This includes resources like images as well as QuickTime and Flash videos embedded in web pages. As a result, visitors can experience a serious delay between the time that they first see the page and the time that the onload script is executed.

If you haven’t yet downloaded the example code, you really ought to do so now—the information in this chapter will be much easier to absorb if you follow along with the lab exercises. Visit this book’s web page at http://www.manning.com/derosa to find the download link, or go to https://github.com/AurelioDeRosa/jquery-in-action.

The first selector available is the All (or Universal) selector, which is represented by an asterisk (*). As the name suggests, it allows you to retrieve all of the DOM elements of a web page, even the head element and its children. To reinforce this concept, let’s say you have the following HTML page:

Listing 15.3. Including libraries in a web page
<!DOCTYPE html> <html> <head> ... </head> <body> ... <script src="js/vendor/jquery-1.11.3.min.js"></script> <script src="js/vendor/underscore-min.js"></script> <script src="js/vendor/backbone-min.js"></script> <script src="js/vendor/backbone.localStorage-min.js"></script> <script src="js/app.js"></script> </body> </html>
Extending jQuery

This is an excerpt from Manning's book Extending jQuery.

jQuery selectors and filters allow you to identify and collect the elements from the web page that you wish to operate upon. Although standard selectors by node name, ID, and class are built into jQuery, there’s scope for adding pseudo-class selectors (extending the CSS-defined pseudo-classes) that allow you to filter a previous selection consistently and succinctly. You can also add set filters that are aware of the entire collection of previously selected elements and each one’s position within that list. Chapter 3 explains how to create these selectors.

One of the most widely used of jQuery’s features is its animation functionality, which provides support for animating various properties of elements, resulting in visual changes on the web page. Besides the basic show and hide functions that provide an animated transition if a duration is specified, several slide and fade animations are also available as standard, such as slideDown and fadeIn. If you want something more exotic, you can request a custom animation to move an element to a particular position or to change its dimensions or font size by using the animate function.