Hello i have this following function:
... var model = $("#carModel");
.... model.change(validModel);
function validModel(){
if(model.val() == 0){
model.addClass("errorJS");
return false;
}else{
model.removeClass("errorJS");
return true;
}
}
I am getting carmodel id from a select box generated after an AJAX call. I can get its value in the Firebug console, but the function doest not execute. Even tough i use model.livequery(validModel);
// The errorJS class puts a red border arround a element, if the function returns false