I have a link button that I want to change it onclick callback function when clicked:
I am using .attr() to change the onclick event but it simply doesn't work.
$('#' + test).text('Unlike');
$('#' + test).attr("onclick", "return deleteLikeComment('"
+ CommentsWrapper + "','" + activityID + "', '" + test + "');");
But it simply doesn't work.
I just want to switch the callback method when the link is clicked.