1
I’m trying to use the Bootstrap + Chosen, in my select option
to make a combobox with autocomplete.
Only I’m filling in the select dynamically with jquery.
But when implementing Bootstrap + Chosen the dynamic padding doesn’t work, while Chosen does and if I take out Chosen the dynamic padding works.
My fill is like this:
function carregarComboSetor( idSetor ){
$.ajax({
url : 'funcao/setor.php',
type : 'post',
dataType : 'json',
data : {
acao : 'S',
cdsetor : idSetor
},
success : function (data) {
var op = "<option value='0'>Selecione um setor</option>";
$('#setor').append(op);
$.each( data.setor, function (key, value) {
var option = "";
if( idSetor === value.codsetor ){
option = "<option value='"+ value.codsetor +"' selected>"
+ value.nmsetor
+"</option>";
}else{
option = "<option value='"+ value.codsetor +"'>"
+ value.nmsetor
+"</option> ";
}
$('#setor').append(option);
} );
$('#setor').val( idSetor );
}
});
}
EDITION 1
In the console only shows these texts
See if any are returning
erro
in the log console.– NoobSaibot
Do not return errors, in fact only those notices as per editing
– adventistaam