ie8中的YUI3选择器问题 [英] YUI3 selector problem in ie8

查看:133
本文介绍了ie8中的YUI3选择器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Y.one('form fieldset:nth-​​child(2)')。toggleClass('hide');

Y.one('form fieldset:nth-child(2)').toggleClass('hide');

工作,但在ie6-8它抛出一个错误
'Y.one(...)'是null或不是一个对象。

in chrome, FF, opera this line works but in ie6-8 it throws an error 'Y.one(...)' is null or not an object.

问题在哪里?

推荐答案

如果您想在原生不支持CSS3选择器的浏览器中使用CSS3选择器,请将selector-css3模块添加到.use()语句中。

Have to add the "selector-css3" module to your .use() statement if you want to use CSS3 selectors in browsers that don't support them natively.

这篇关于ie8中的YUI3选择器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆