jquery event handlers on HTML redraw
<p>Suppose I have the following HTML and js</p>

<pre><code>&lt;div&gt;
  &lt;div class="testdiv" id="test1"&gt;test&lt;/div&gt;
  &lt;div class="testdiv" id="test2"&gt;test&lt;/div&gt;
&lt;/div&gt;

function DynamicEvents() {

  $('.testdiv').click (function () {
     DoSomething();
  });
}

function RedrawHTML() {

  $('#test1').html('new HTML');
  DynamicEvents();
}
</code></pre>

<p>Everytime I'm calling <code>RedrawHTML</code>, I'm also calling <code>DynamicEvents</code> to rebind test1. Suppose I'm calling <code>RedrawHTML</code> several times to update the div. My question is this: when I click on test2, does the function <code>DoSomething()</code> get executed once or get executed as many times as I've called <code>RedrawHTML()</code>?</p>
