Jquery Click event - A Nightmare !
<p>I have one link button with a click event. When Clicked I want to change its click event handler to call another method. I am using this :</p>

<pre><code>$('#' + test).bind('click', function () { return LikeComment(test, CommentsWrapper, activityID, textAreaID, btnAddCommentID, addCommentBox, textUnLike, textLike, likeWrapperID); });
</code></pre>

<p>The next time it is clicked I bind it with this :</p>

<pre><code> $('#' + test).bind('click', function () { return UnLikeComment(test, CommentsWrapper, activityID, textAreaID, btnAddCommentID, addCommentBox, textUnLike, textLike, likeWrapperID); });
</code></pre>

<p>The thing is the handlers are buffering. the second time I click the link, the 2 methods are called. </p>

<p>Nothing helped. I used unbind() same thing.</p>

<p>Any suggestions ?</p>

<p><strong>More Info</strong></p>

<p>The initial status of the link button is like this :</p>

<pre><code>  &lt;a class='activitysmalllink' href='javascript:void' id='{0}' onclick='return LikeComment( ... ) '
</code></pre>

<p>When I click the LIKE link button, I invoke this code :</p>

<pre><code>  $('#' + test).bind('click', function () { return deleteLikeComment(test, CommentsWrapper, activityID, textAreaID, btnAddCommentID, addCommentBox, textUnLike, textLike, likeWrapperID); });

 $('#' + test).text(textUnLike);
</code></pre>

<p>the weird thing is that this method is invoked as soon as I bind the link using the above following code.</p>
