$('.divMapTab:not(:first)').each(...
我的页面上有 2 个 div,都带有 divMapTab 类。在 FF 和 Chrome 中,上面的代码只选择了 divMapTab 的第二个实例,但在 IE 中它同时选择了它们。
我是否错过了 :not 或 :first 关键字如何工作的微妙之处?
最佳答案
IE does not support the CSS :not selector此方法所依赖的。而是尝试:
$('.divMapTab').not().first().each(...
关于jquery-selectors - jQuery :not(:first) not working in IE8, 但在 FF 和 Chrome 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2859250/