I have div in which I am getting ajax response
<div id="demo"></div>
And in response I am getting three buttons with id and values
<button type="button" class="Model" onclick="ModelAppAll(<?php echo $i; ?>)">Approve All</button>
<button type="button" class="Model" onclick="ModelRejAll(<?php echo $i; ?>)">Reject All</button>
Now I want to call a function and get the $i values in alert box like
function ModelAppReqId1(){
alert(this.id);
}
Or like this with jquery
$(".model").click(function{
alert(this.value);
});
In short I want work with AJAX response like actual DOM element. I am not able to find any class [model] in responce text. Give some Ideas Please
Aucun commentaire:
Enregistrer un commentaire