Why does my function get called twice in jQuery?
<p>I have the following jQuery</p>

<pre><code>$('img[title*=\"Show\"]').click(function() {
        //$e.preventDefault();      
        var position = $('img[title*=\"Show\"]').parent().position();
        $('#popover').css('top', position.top + $('img[title*=\"Show\"]').parent().height() + 150);
        console.log(position);
        $('#popover').fadeToggle('fast');
        if ($('img[title*=\"Show\"]').hasClass('active')) {
          $(this).removeClass('active');
        } else {
          $('img[title*=\"Show\"]').addClass('active');
        }
      });
</code></pre>

<p>I have two images with the title "Show Options." For some reason whenever I click on any of these images, it gets printed TWICE. When I only have 1 image, it only gets printed once. Why is this?</p>
