Wednesday, 18 September 2013

toggleclass not binding click event

toggleclass not binding click event

Added a class to my button and trying to launch on onclick event after,
not working . pretty simple code why is the event not binding what am I
doing wrong?
http://jsfiddle.net/davidThomas/n2WUn/3/



$(".remove-participant").on("click",function(){
$(this).html('Approve');
$(this).toggleClass('add-participant');
});
$(".add-participant").on("click",function(){
alert('why no alert?');
$(this).html('Waitlist');
$(this).toggleClass('add-participant');
});

No comments:

Post a Comment