I have this div to which I want to inject the html code:
<div id="phas"></div>
And this is the html code that I want to add, but inside, it has a php function to build the options of a select.
var myString = '<label>Selecciona:</label><br>
<select class="form-control" name="attendanceSales" id="attendanceSales">
<?php echo createSelectorOptions(); ?>
</select>';
And with this jquery function I made the append:
$("#phas").append(myString);
The problem is that I can not do the php function that populates the select, this is possible using append in jquery?