1
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 the data-tokens this way:
$('#priorities-info').each(function() {
$(this).attr('selected', this.dataset.tokens == responseData.Type);
});
But I’m not getting it, does anyone have any idea?
What is the value of
responseData.Type
?– Marconi
@Marconi
Type: Média
– Wagner Viana