call function after appending button
- by Mahmoud
i make jquery code add html elemnt button2 when event click on button1 ,
and make another to add another html elemnt to div when click on button 2
the first one run but the second not !!
how solve this problem ?
example of problem
var button2='<input type="button" vale="add" id="idbutton2" >';
$('#idbutton1').click(function(){
$('#divid1').html(button2);
});
$('#idbutton2').click(function(){
$('#divid2').html("text");
});
the button 2 add to div and i want run jquery when click on button 2