1
Good morning.
I am creating a button dynamically via an answer from an sql.
$this->return.='<div class="row">
<div class="col-xs-12 col-lg-12 col-md-12 col-sm-12">
<input type="button" id="btnSegundaEtapa" class="btn btn-success green pull-right" value="Proximo" name="btnSegundaEtapa">
</div>
</div>';
There I am taking it this way
$("#btnSegundaEtapa").on('click',function () {
console.log("Ooooi");
});
You have to use
$(document).on('click','#btnSegundaEtapa', function () {
. You’re using#btnSegundaEtapa
more than once?– Sergio
No, just this once
– gabrielfalieri
Okay, good! I linked a question that answers your question, basically what I put in the comment.
– Sergio
All right, my man, it worked out, thanks
– gabrielfalieri