I have this code of selectpicker (bootstrap)
<select name="nivel_p" class="selectpicker">
<option>menor que 6</option>
<option>7-15</option>
<option>16-40</option>
<option>maior que 40</option>
</select>
I need to trigger a command every time the selection of the select is changed, but I do not have the slightest idea of how it did I thought of something like:
$('select[name=nivel_p]').selectpicker(function() {
}
But it did not work, what is the right way to do it?