I'm try to disable (and remove) some attributes in jQuery, but it seems not working when value is changed and set to "disabled" some fields. This script runs when a value of drop-down box is changed.
Here code below:
$(".tipo_frete").change(function(){
if($(this).val() == "FOB" ){
$(".id_transp").attr("disabled");
$(".id_transp").val("");
$(".nome_transp").attr("disabled");
$(".nome_transp").val("");
$(".valor_frete").attr("disabled");
$(".valor_frete").val("");
}else{
$(".id_transp").removeAttr("disabled");
$(".valor_frete").removeAttr("disabled");
$(".nome_transp").removeAttr("disabled");
}
});
Did I do something wrong here?