In my CSS I have a rule that must be applied to all text fields (using the CSS3 selector input[type=text].
I also use jQuery. Some browsers like Internet Explorer 6 does not support that form for CSS selector. So my workaround is to add an extra classname in CSS:
input[type=text], .workaround_classname{
/* css styling goes here */
}
And via jQuery then add the CSS class:
$('input[type=text]').addClass('workaround_classname');
The Question is: How do I make sure this rule only is invoked when CSS3 selectors are not natively supported?
I ended up using conditional comments in my javascript file. This way I could address IE6 and apply the CSS class
This way, I end up with added class names for all form fields: