CDelaney
CDelaney

Reputation: 1248

YUI :checked selector in IE?

I had a query written as:

Y.all('.myClass:checked');

It worked great in everything but IE (8). I can't seem to get ':checked' to work at all with IE. Is it possible to query for only checked checkboxes like this and be compatible with IE?

Upvotes: 1

Views: 535

Answers (2)

CDelaney
CDelaney

Reputation: 1248

Sounds like they found and fixed the problem way back when: yuilibrary.com/projects/yui3/ticket/2528895 could be something else going wrong. If no one gives you a good answer you might eventually want to file a bug report.

-TheZ (in comments of original question)

This is a bug in yui3 versions earlier than 3.2

Upvotes: 0

Kevin
Kevin

Reputation: 632

Have you included the selector-css3 module? otherwise I believe YUI will treat it like a normal query and that would be why you get it in modern browsers but not IE

YUI().use('node-base','selector-css3', function(Y){
    Y.all('.myClass:checked');//Should now work in all browsers
});

Remember to always declare your dependencies with YUI

Upvotes: 6

Related Questions