How to style from elements unobtrusively in all browsers including IE6
A:
Use jQuery. Specifically the toggleClass
function and then use CSS classes to style your forms. No plugin required. See jQuery Attributes Documentation.
If you want more styles, check out jQuery UI.
sirlancelot
2009-11-23 06:28:05
is there any plugin to make this easily possible
metal-gear-solid
2009-11-23 06:29:51
A:
Use class names for you elements for which you can't apply styles generally in CSS.
rahul
2009-11-23 06:49:48
@jitendra - you'll have to explain why. If you can't add class to the markup you are severely crippled and if you can't do that why on earth can you add JS or CSS?
annakata
2009-11-23 07:06:32
@annakata - yes i can add external js and css but nothing as inline css class, inline style etc
metal-gear-solid
2009-11-23 07:12:59
+3
A:
There are a few plugins that do what you want. Basically, you want to add special styling to forms via javascript + css, but want the form to function normally if javascript is disabled
Here are two such plugins, but I am sure there are more out there:
Doug Neiner
2009-11-23 06:54:37
Sorry, I don't! Uniform was really shaping up to be cool, but I guess Josh got busy because he hasn't updated it since June.
Doug Neiner
2009-11-23 07:14:00
Uniform is very cool, but in my case i can't any xhtml <span>Choose</span> and class or ID to form element. I need styling on default html markup of formelements
metal-gear-solid
2009-11-23 07:44:35
A:
So far i found this is best and works in IE 6+, safari 2+, firefox 2+
http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/
metal-gear-solid
2009-12-14 15:52:41