I have the following HTML code:
<select id="priorities-info" class="form-control selectpicker" data-live-search="true" disabled="" tabindex="-98">
<option value="1" data-tokens="Alta">Alta</option>
<option value="2" data-tokens="Média">Média</option>
<option value="3" data-tokens="Baixa">Baixa</option>
</select>
I'm trying to compare data-tokens like this:
$('#priorities-info').each(function() {
$(this).attr('selected', this.dataset.tokens == responseData.Type);
});
But I can not, does anyone have any ideas?