Bootstrap select custom dynamic options
<p>I am using <a href="https://silviomoreto.github.io/bootstrap-select/" rel="noreferrer">bootstrap select</a> and I encounter a problem when I want to add dynamic options using Javascript. The list is always empty. When I switch back to using HTML select the following Javascript code works perfectly.</p>

<p>HTML:</p>

<pre><code>&lt;select class="selectpicker" data-style="btn-lg btn-list-author" 
id="author-list" data-live-search="true" title="Select Author"&gt;&lt;/select&gt;
</code></pre>

<p>Javascript:</p>

<pre><code>readDataFromGit('https://api.github.com/repos/' + repolink + '/contributors', function(text){
         data = JSON.parse(text);
         $.each(data, function(i, v) {
         alert(v.login);
         var ul = document.getElementById("author-list");
         var li = document.createElement("option");
         var linkText = document.createTextNode(v.login);
         li.appendChild(linkText);
         ul.appendChild(li);
     })
});
</code></pre>