selectize js is behind the input

Asked

Viewed 39 times

0

I’m using selectize and I’m having a problem imput is behind my table and the states only the first is on the white background the others are transparent someone knows how I can solve this?

inserir a descrição da imagem aqui

Follow my code in Js

$(".js-combo-uf")
.on(
        "change",
        function() {
            var id_estado = $(this).val();
            $
            .ajax({
                type: "GET",
                url: "/listacidades",
                data: ({
                    parametroBusca: id_estado,
                    tipoBusca: 'uf'
                }),
                dataType: 'json',
                success: function(data) {
                    var text = "<select class='form-control' name='cidade' id='selecionar-estados' ><option value=''>Cidade</option>";
                    for (i = 0; i < data.length; i++) {
                        text += '<option value="' +
                        data[i] + '">' +
                        data[i] + '</option>';
                    }
                    text += '</select>';
                    $(".js-combo-cidade").html(text);
                    $('.js-combo-roteiro').prop('selectedIndex', 0);
                    $('#selecionar-estados').selectize();

                }
            });
        });

the libraries I installed was:

<script th:src="@{/js/selectize.js}"></script>
  • Also put HTML and CSS. This may be a style problem.

1 answer

0

failed to add the css

<link rel="stylesheet" th:href="@{/css/selectize.css}" />

<link rel="stylesheet" th:href="@{/css/selectize.bootstrap3.css}" />

after adding them, it worked.

Obs: their documentation is not well explained.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.