Try "borderStyle" instead of "border-style" and you should be okay.
On Aug 19, 10:44 pm, Terry <tgs154...@yahoo.com> wrote: > I'm trying to "turn" the border for input fields on (or off). > > In my css I have border-style:none, and I want to turn the border back > on if the first input is empty. > > $("input[type='text']").each(function() { > $(this).attr("border-style", "inset"); > > }); > > The above code loops through the correct set of text input fields, but > the border is not "turned" back on? > > I've been using jquery for a couple of weeks and use javascript > infrequently, so jquery is very helpful in implementing my projects. > > Is the css overiding what I want to happen, or am I not using the attr > () method correctly? I've also tried the opposite in not having css > turn the border off, and use the attr() to turn it off, so it seem > like an attr() usage issue to me? > > Thanks, > > Terry