Add a Click Event to elements added to the DOM
<pre><code> var myOP = '&lt;div&gt;';
 for (var i = 0; i &lt; op.length; i++) {
     myOP += '&lt;div&gt;';
     myOP += '&lt;div id="myBTN-' + [i] + '"&gt;' + op[i]['Field1'] + '&lt;/div&gt;';
     myOP += '&lt;div id="blah-' + [i] + '"&gt;' + op[i]['Field2'] + '&lt;/div&gt;';
     myOP += '&lt;/div&gt;';
 }
 myOP += '&lt;/div&gt;';
 $("#myBTN-" + i).click(function () {
     $('#blah-' + i).toggle("slow");
 });
 $('#container').html(myOP);
</code></pre>

<p>I'm trying to get the click function to fire on the elements i'm created w/ the above for loop. Can anyone point me in the right direction?</p>
