I'm trying to make a language selector button with flags in HTML & JS, but the result I'm getting doesn't match the example I found here: https://codepen.io/brapastor/pen/BWyomB The picker selector works, but the flag and the appearance doesn't works. What am I doing wrong please ?
<select class="selectpicker" data-width="fit">
<option data-content='<span class="flag-icon flag-icon-us"></span> English'>English</option>
<option data-content='<span class="flag-icon flag-icon-mx"></span> Español'>Español</option>
<script type='text/javascript'> $(function(){
$('.selectpicker').selectpicker();
});</script>