I am changing my current class on the first click event and then I would like the class it was replaced with to have its own click event. Here is my current attempt:
$(".originalButton").on("click", function(){
// THIS WORKS, it changes the class.
$(this).closest(".questions").find(".originalButton").removeClass("originalButton").addClass("correctButton").off("click");
});
Now right under event handler I added this:
$(".correctButton").on("click", function(){
debugger;
});
Ideally I would have something else instead of debugger, but at this point the event isn't even firing when the correctButton class button is clicked, even though when I inspect element the class updated properly (from the first click event).