Skip to content Skip to sidebar Skip to footer

Color As Jquery Variable In For Loop

I have a for loop that I am using to validate fields in my form where I apply or disable certain classes depending on if the validation passes or not. See below function inlineVali

Solution 1:

using .css it's not enough to set just the border color - by default the border width is 0px.

You can do this:

var c = {'border-color':'#ff9999','border-width':'1px','border-style':'solid'};

or you can this:

var c = {'border':'1px solid #ff9999'};

Live example: http://jsfiddle.net/caoo0zgd/

Post a Comment for "Color As Jquery Variable In For Loop"