ruspak thx but it also works wrong. But I think I have found the best solution. For example - we have a form with these fields: <input type="text" class="text_field" id="name"/> <input type="text" class="text_field" id="surname"/> <input type="text" class="text_field" id="email"/>
First - we must create style class for incorrect fields: <style type="text/css"> .wrong { background-color: red; } </style> Then if field (for example field with id = email) is wrong we must add class 'wrong' to this field: $('#email').addClass('wrong'); //field 'email' has red background now If field (for example field with id = email) is correct: $('#email').removeClass('wrong'); //field 'email' has default background now If somebody clicked reset button - delete class 'wrong' from ALL fields which has got class 'text_field': $('.text_field').removeClass('wrong'); //all fields has got default color now On 28 Sie, 14:34, rupak mandal <rupakn...@gmail.com> wrote: > Hi > You may try this > > $('#first_input').css('background-color', 'transparent'); > > On Fri, Aug 28, 2009 at 5:00 PM, dziobacz <aaabbbcccda...@gmail.com> wrote: > > > interesting - Your solution works in Firefox and in Chrome but it > > doesn't work in IE 8 and Opera - in these browser background color > > inputs is still red - hm... strange - what should I do ? > > > On 28 Sie, 12:59, Paolo Chiodi <chiod...@gmail.com> wrote: > > > try $('#first_input').css('background-color', null) > > > > On Fri, Aug 28, 2009 at 12:23 PM, dziobacz<aaabbbcccda...@gmail.com> > > wrote: > > > > > I have inputs with validationin in jquery. If data are wrong I make > > > > red background color in input: > > > > $('#first_input').css('background-color', 'red'); > > > > > After click reset I would like to see default input color so I make: > > > > $('#first_input').css('background-color', 'white'); > > > > > But inputs with background-cloror: white looks different than default > > > > inputs - why ?