开发者

Mootools support for selector chaining?

Does Mootools support pseudo-class selector chaining either natively or with a plugin? In jQuery, for example:

$("div:first-child:visible:contains('chocolate chip cookie') > h1")

I know this can be accomplished by chaining method calls but I'm really after having all of the sel开发者_Go百科ectors within the string.


Not natively.

I added this per Crescent Fresh's comment above.


Considering that :visible is a jQuery invention, and not a real pseudo-selector, the provided example works just fine with MooTools.

That said, it's MooTools, you can extend it pretty easily to implement a :visible pseudo-selector:

Example: http://jsfiddle.net/X2xcx/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜