Call a function after appending button
<p>I make jQuery code add HTML elemnet button2 when event click on button1  ,
and make another to add another HTML element to DIV when click on button2
the first one runs but the second not. How to solve this problem ?</p>

<p>Example of problem</p>

<pre><code>var button2='&lt;input type="button" vale="add" id="idbutton2" &gt;';
$('#idbutton1').click(function(){
  $('#divid1').html(button2);
});

$('#idbutton2').click(function(){
  $('#divid2').html("text");
});
</code></pre>

<p>The button2 adds to DIV and I want to run jQuery when click on button2 occurs.</p>
