官术网_书友最值得收藏!

Chapter 3. DOM Traversal Methods

In addition to the selector expressions described in Chapter 2, Selector Expressions, jQuery has a variety of DOM traversal methods that help us select elements in a document. These methods offer a great deal of flexibility, even allowing us to act upon multiple sets of elements in a single chain as follows:

$('div.section').addClass('lit').eq(1).addClass('profound');

At times, the choice between a selector expression and a corresponding DOM traversal method is simply a matter of taste. However, there is no doubt that the combined set of expressions and methods makes for an extremely powerful toolset for acting on any part of the document we desire.

主站蜘蛛池模板: 武鸣县| 华坪县| 沭阳县| 青浦区| 卢湾区| 泉州市| 汾西县| 三都| 闸北区| 广宗县| 东宁县| 望谟县| 台湾省| 水富县| 富顺县| 天台县| 安远县| 山丹县| 桑植县| 楚雄市| 海盐县| 壤塘县| 和平区| 封丘县| 济南市| 金平| 旌德县| 黔江区| 囊谦县| 云南省| 双鸭山市| 隆昌县| 德保县| 田阳县| 夏津县| 沂南县| 蓬安县| 疏勒县| 宣武区| 洛南县| 志丹县|