20160212 jQuery find

jQuery find

Given a jQuery object that represents a set of DOM elements, the .find() method allows us to search through the descendants of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .find() and .children() methods are similar, except that the latter only travels a single level down the DOM tree.

find() 遍历整个 DOM 树中的后代,children() 遍历下一层的元素。
find() 在使用时必须带参数,想遍历所有的后代元素可以用 *