I've got a jQuery function that triggers when the selected option from a select element changes, its a function that is applied to the select element when it have a specific class:
<script type="text/javascript">
$(document).ready(function()
{
$('.acompanante').on('change', function(event)
{
//my code
}
}
</script>
And this is my select element code:
<select class="acompanante" name="acompanante_anterior" id="<?php echo "$i" ?>">
<option value="0" ><?php echo $txt_nuevo_acompanante;?></option>
....
</select>
How do I call the jQuery .change()
event of the select element from PHP?