Tobie Langel
2006-May-29 19:51 UTC
attribute selectors: IE6 compatibility and enhancements
Hi All,
I''ve posted a patch a couple days ago to bring IE6 compatibility and
enhancements to Brian Donovan''s attribute selectors.
It''s here: http://dev.rubyonrails.org/ticket/5170
What it does:
* adds full IE6 compatibility to attribute selectors.
* adds ^=, $= and *= operators
* replaces != (not in spec) by :not(X) which is applicable to ALL
operators, so you can do things like:
$$(''form#foo input:not([type=text])'').each(function(input) {
Element.setStyle(input, {color: ''red''});
});
$$(''#foo
a:not([href^="#"]):not([class~="external"])'').each(function(element)
{
$(element).addClassName(''external'');
});
* adds detailed test for the enhancements and IE bug corrections...
Attribute selectors should now fully work in Firefox, Safari... and
Internet Explorer 6.
Would very much appreciate any comments, remarks, suggestions, etc.
Regards,
Tobie
