Ancestry

Ancestry
 点击下载

Adds two additional filter types to jQuery:

  1. $().descendantOf(DOMElement); 
  2. $().ancestorOf(DOMElement); 

This plugin was created because there is no default method for determining DOMElement containment after initial selection. It was discussed on the jQuery Development group and the following people contributed comments and code that all informed the final result: Michael Geary, Diego Perini, John-David Dalton, John Resig, and Nathan Hammond.

Also, if you're feeling bold, there is included a bit of code to allow for a context to be specified when searching for a DOMElement.

 

转载请注明:代码家园 » Ancestry

评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)