jquery-steps
jquery-steps copied to clipboard
Problem when filling select with ajax when deploying jquey.spets.js
hi, I have a problem, I have a select that dynamically filled via ajax within a form, but when implementing the jquery steps, it no longer fills the select, although the request is made without problems.
Here I leave my code
$.ajax({
url: 'ds/dsProducto.php',
"data": {tipo: "buscar", buscar: "categorias"},
method: 'POST',
dataType: 'json'
}).done(function (data) {
if (data.success) {
let categoria = $("#CategoriaID");
categoria.empty().append('<option value="">- Ninguno -</option>');
for (let a = 0; a < data.response.length; a++) {
categoria.append('<option value="' + data.response[a].CategoriaID + '">' + data.response[a].Nombre + '</option>');
}
}
});
let form = $("#formProducto");
let formValidate = form.parsley();
form.steps({
headerTag: 'h3',
bodyTag: 'section',
transitionEffect: "slideLeft",
startIndex: 0,
autoFocus: true
});
Thanks in advance