有谁知道 YUI 库中最接近(元素)(jQuery)的等价物?
问问题
813 次
1 回答
3
http://yuilibrary.com/yui/docs/api/classes/Node.html#method_ancestor
祖先(fn,testSelf,stopFn)节点
返回通过提供的布尔方法应用的测试的最近祖先。参数:
fn String | Function
A selector string or boolean method for testing elements. If a function is used, it receives the current node being tested as the only argument.
testSelf Boolean
optional Whether or not to include the element in the scan
stopFn String | Function
optional A selector string or boolean method to indicate when the search should stop. The search bails when the function returns true or the selector matches. If a function is used, it receives the current node being tested as the only argument.
返回: Node:匹配的 Node 实例,如果没有找到则返回 null
于 2012-06-06T14:37:59.193 回答