I have a link that will load via ajax some content.
My problem is, I don\'t want to remove the text \"Load comments\", I just want to not allow more clicks in this c
Use jQuery's one()
function
$(".showcomments").one("click", function() {
http://www.w3schools.com/jquery/event_one.asp
The one() method attaches one or more event handlers for the selected elements, and specifies a function to run when the event occurs.
When using the one() method, the event handler function is only run ONCE for each element.
When you bind an event handler, you bind to the element, not to the class. Removing a class from an element doesn't change which event handlers are bound to the element.
You could use off() to remove the event handler:
$(this).off('click');
http://jsfiddle.net/om6ggvyu/