javascript runtime gallery buttons click event
<p>There is a gallery which reads the data from a database.</p>

<p>Below of that there are some circles which shows the number of all data or records.</p>

<p>Each time a circle turns to yellow which indicates that what is the active post.</p>

<p>I have generate this mechanism by this way :</p>

<pre><code>function drawCircles(activeIndex) {
    var off_html = '&lt;img class="post_circle" src="../themes/dark/images/off.png"/&gt;';
    var on_html = '&lt;img class="post_circle" src="../themes/dark/images/on.png"  /&gt;';
    $('#circles').empty();

    for (var i = 1; i &lt;= pcount; i++) {

        if (i != activeIndex) {
            $(off_html).appendTo($('#circles'));
        }
        else {
            $(on_html).appendTo($('#circles'));
        }

    }


}
</code></pre>

<p><strong>PCount = Count of All Posts...</strong></p>

<h2>#circles div is a bar which circles are in it.**</h2>

<p>when we call </p>

<pre><code>drawCircles(2)
</code></pre>

<p>The second circle turns to yellow.
Now I want to make a click event for that.I want to understand which circle has been clicked?
I have tried <strong>.live</strong> function , but I can't found that which circle has been clicked...</p>
