Answer the question
In order to leave comments, you need to log in
How to make a list of countries with flags using bootstrap?
Hello.
I am using this plugin . But in place of elem I need to insert the name of the countries with flags, for example Example 4 . But it's a dropdown menu, and I just want a list.
It turned out something like this:
<section id="select">
<div class="container">
<div class="row">
<div class="col-md-12">
<div id="select_countries">
<select role="option" id="public-methods">
<option><a tabindex="-1" href="#" data-option="" data-flags="true"></a></option>
<option><a tabindex="-1" href="#" data-option="AF" data-flags="true"><i class="glyphicon bfh-flag-AF"></i>Afghanistan</a></option>
<option><a tabindex="-1" href="#" data-option="AL"><i class="glyphicon bfh-flag-AL"></i>Albania</a></option>
</select>
</div>
</div>
</div>
</div>
</section>
<ul class="ms-list" tabindex="-1">
<li class="ms-elem-selectable ms-selected" id="0-selectable" style="display: none;"><span style="display: none;"></span></li>
<li class="ms-elem-selectable" id="-884569212-selectable"><span style="display: none;">Afghanistan</span></li>
</ul>
Answer the question
In order to leave comments, you need to log in
With this plugin, without altering its internal logic, there is no way.
You should look at the source before asking a question. There, any html in the options is hard cut, even if they are dynamically set.
Plus, custom markup is generated according to data from the native (hidden) select. And in the native select, only text is allowed in the options, no html (here the browser itself cuts during the construction of the DOM).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question