Good afternoon, I'm trying to make the jquery change action work within a modal that is within a while loop in php, where I use a select from the STATES field that populated another select from the CITIES field when I ran the first record of my query it works normal and searches the cities according to the state that I selected, this is when I do the registry edit process, follow the script:
//FUNCAO PEGAR CIDADES NATURALIDADE $(function (){ $("#ufs").change(function(){//aqui a função é ativa qdo o usuário sair do campo cpf var estados = $("#ufs").val(); $.post("includeAjax/carregar-cidades.php", {id:estados}, function(pegar){ $("#cidades").html(pegar); }); }); });
More when I edit the second record and open the modal, and I will trigger the select, it simply does not perform change action when selecting the States field, does anyone know how to force the jquery change on that action? I hope I have explained it right!