开发者

Mootools support for selector chaining?

开发者 https://www.devze.com 2022-12-11 22:04 出处:网络
Does Mootools support pseudo-class selector chaining either natively or with a plugin?In jQuery, for example:

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

精彩评论

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