0
I have a function in JS and I intend to run it when changing the select, I call it so:
$("#table1 .td_select select").on("click select", function(){
calcSub($(this).closest("tr"));
calcTotal();
});
<div class="table1">
<td class="td_select">
<select name="id_lub" id="id_lub" class="btn-block">
<option value="">Nenhum</option>
...
</select>
</td>
</div>
If I change the option of select the function is not executed, but if I click on the select he performs the function. I believe I’m calling the function the wrong way up on JS. Following the same structure, which is the right way to insert the data between $()?
You could uasr the change like this: $(Document). on('change', '#table1 . td_select', Function(){ /code here/ });
– SylvioT