最近小弟正看一个jQuery的树结构,其中里面提到
this.filter(":not(:has(>a))").find(">span").click(function(event) {
if ( this == event.target ) {
toggler.apply($(this).next());
}
}).add( $("a", this) ).hoverClass();
其中(":not(:has(>a))")中的>a不知道是什么意思,find(">span")也不知道是什么意思。希望有人指点一下。谢谢。
原代码附件:位置jquery.treeview.js里的。
this.filter(":not(:has(>a))").find(">span").click(function(event) {
if ( this == event.target ) {
toggler.apply($(this).next());
}
}).add( $("a", this) ).hoverClass();
其中(":not(:has(>a))")中的>a不知道是什么意思,find(">span")也不知道是什么意思。希望有人指点一下。谢谢。
原代码附件:位置jquery.treeview.js里的。
>a表示该元素与<a>是父子关系 >表示父子关系find(">span") 得到子元素<span>