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