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

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.

主站蜘蛛池模板: 马公市| 延边| 西峡县| 安阳市| 松溪县| 新昌县| 阳新县| 大连市| 北票市| 交城县| 叶城县| 毕节市| 衡东县| 琼结县| 湄潭县| 盐边县| 孝感市| 舒兰市| 大方县| 塘沽区| 赣州市| 龙门县| 沙湾县| 河东区| 和田市| 平泉县| 且末县| 玉田县| 襄垣县| 丰都县| 济源市| 应用必备| 凤台县| 南汇区| 景谷| 台湾省| 田东县| 南宁市| 新建县| 平湖市| 灵台县|