Can you help me with a function that removes texts from two combos? The combos are the following:
The problem is that by eliminating the selection of the Country combo, the other combos (State and Municipality) must be cleaned, that is to say, Lima and San Isidro should no longer show. I already try and the only thing that works for me is to detect that Country is already empty. I do not know what attributes I should use to not show me the texts. And this is the code:
jQuery(document).ready(function(){
$('#tblempleados-pais').on('change', function(){
if($('#tblempleados-pais').val() == '' || $('#tblempleados-pais').val() == null){
alert('entra');
$('#tblempleados-estado').val('');
$('#tblempleados-municipio').val('');
}
});
});