How to attach click events inside click events
<p>I have a click event that is attached via another click event. The problem is the event handler I'm attaching gets fired by the same click that fires the initial event.</p>

<p>The first one is actually a drag event, but i guess that when the dragged element is released over the element that is supposed to get a click handler it fires that new handler as well.</p>

<pre><code>function obj() {
   ...
   this.whatDropped = function(drop) {
      if(drop.type == "textbox") {
         $(document).click(function() {
            //triggered immediately
         });
      }
   }
}
</code></pre>

<p>this.whatDropped() is triggered by another event.</p>
