2
I have the following script:
$("#tp_pagamento").change(function(){
var tp_pagamento = $(this).val();
$.ajax({
url: BASE_URL + "ajax/lista_integrador",
type: "POST",
data: {tp_pagamento:tp_pagamento},
success: function(data){
$('.tp_integradora').html("<select id=\"tp_integradora\" name=\"tp_integradora\" class=\"form-control\"><option value='0'>Carregando...</option></select>");
setTimeout(function(){
$('.tp_integradora').html(data);
},1000);
}
});
});
$("#tp_integradora").change(function(){
var tp_integradora = $(this).val();
alert(tp_integradora);
if(tp_integradora==1){
$("#logo_integradora").html("<img src="+ BASE_URL + "/assets/images/integradora-cielo.jpg>");
}
});
My idea is that: When selecting tp_payment, search the available ones and list in another select, and this does, however, I need that when selecting the next select, it has no action... How I can fetch the select data that was displayed on the screen?