Bootstrap-select DropDownList not showing
<p>I have a bootstrap-select combobox that I fill with data in an ajax call
<strong>Html:</strong></p>

<pre><code>&lt;div class="row"&gt;
&lt;select id="selectGemeente1" class="selectpicker" data-live-search="true"&gt;&lt;/select&gt;
&lt;/div&gt;
</code></pre>

<p><strong>Ajax call:</strong></p>

<pre><code>var gemeenteLijst = [];

var GetGemeentes = function () {
    $.ajax({
        type: "GET",
        dataType: "json",
        url: 'https://localhost::blabla',
        contentType: "application/json; charset=utf-8",
        success: function (data) {
            var test = document.getElementById("selectGemeente1");
            data.forEach(function (item) {
                var opt = document.createElement("option");
                opt.value = item.GemeenteId;
                opt.innerHTML = item.Naam;
                test.appendChild(opt);
            });         
        },
        error: function (xhr, status, error) {
            alert(xhr.responseText);
        }
    });
}

$(document).ready(function () {
    GetGemeentes();  
})
</code></pre>

<p>After running my application, my select is filled but the dropdown is not opening..</p>

<p><a href="http://i.stack.imgur.com/FkSqd.png" rel="nofollow">html after run</a></p>

<p>I have seen a lot of solutions saying that I should put this in my $(document).ready</p>

<pre><code>$(".selectpicker").html(optgroup);
</code></pre>

<p>but then I get an error saying that .selectpicker is not a function.</p>

<pre><code>gemeenteLijstLaden.js:36 Uncaught TypeError: $(...).selectpicker is not a function
</code></pre>

<p>I have implemented these script files</p>

<pre><code>&lt;script src="~/Scripts/jquery-2.2.3.min.js"&gt;&lt;/script&gt;
&lt;script src="~/Scripts/bootstrap.min.js"&gt;&lt;/script&gt;
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.10.0/js/bootstrap-select.js"&gt;&lt;/script&gt;
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.10.0/js/i18n/defaults-nl_NL.min.js"&gt;&lt;/script&gt;
&lt;script src="~/Scripts/myCharts/gemeenteLijstLaden.js"&gt;&lt;/script&gt;
</code></pre>