I have filled some "ul"s directly in HTML e.g.
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Kennzahl
<span class="caret"></span></button>
<ul class="dropdown-menu" id="measure">
<li><a href="#">volume</a></li>
<li><a href="#">netSentiment</a></li>
<li><a href="#">authors</a></li>
</ul>
and had no trouble reading the selected value by
$('#measure li').on('click', function(){
$(this).text();
});
Then I have tried to get the chosen Value from a "ul" that I filled by JavaScript:
Something like
$('#projectId').append('<li><a href="#">' + projects[i].name + '</a></li>');
The Select is filled with the "li"s. But when I select one, the result isn't caught by the same JavaScript I could use with the "li" directly filled in HTML.