jquery problem- function repeats
<p>I have two thumbnails in <code>&lt;a&gt;</code> tag by clicking them another image (main image) <code>src</code> will change to <code>&lt;a&gt; hrefs</code> tag to show fullsize image.</p>

<p>The function works, but problem is that when I track the function It will repeat relatively to number of clicks.</p>

<p>If its 1st click it runs once, if its 2nd click it runs twice and so on. Here is my code:</p>

<pre><code>&lt;div class="wraptocenter"&gt;&lt;img alt="" src=""  id="myim"  /&gt;&lt;/div&gt;
  &lt;a href="images/cam1.jpg" class="changemimg"&gt; &lt;img alt="" src="images/10.jpg"  /&gt;&lt;/a&gt; 
   &lt;a href="images/cam.jpg" class="changemimg" &gt;&lt;img alt="" src="images/9.jpg" /&gt;&lt;/a&gt; 
   &lt;img src="" id="hiddenimg" style="display:none" /&gt;



$(document).ready(function () {
    $(".changemimg").bind('click', set);
    function set() {
        $("#myim").attr("src", "images/indicators.gif");
        var path = $(this).attr("href")
        $("#hiddenimg").attr("src", path);
        $("#hiddenimg").load(function () { alert('hi'); $("#myim").attr("src", path); });
        return false;

    }
});
</code></pre>

<p>Thanks in advance for any suggestions!</p>
