isAncestor
http://developer.yahoo.com/yui/docs/YAHOO.util.Dom.html#method_isAncestor - 可以取代掉 jquery 的 withinElement
isAncestor
Boolean isAncestor ( haystack , needle )
Determines whether an HTMLElement is an ancestor of another HTML element in the DOM hierarchy.
Parameters:
haystackThe possible ancestor
needleThe possible descendent
Returns: Boolean
Whether or not the haystack is an ancestor of needle
沒有留言:
張貼留言