I get that error with the following code. anyone know why?
function validateAdminInput(){
var mandFields = $('.mand');
for(i=0; i< mandFields.length;i++){
if (mandFields[i].value == ""){
mandFields[i].css('border','solid red 1px');
}
}
}
mandFields[i]gives you the underlying DOM element. You need to wrap it in a$(mandFields[i])if you want to access the jQuery.css()function.Or:
or even: