Having trouble with on() and off() method
I'm an old newby to jQuery and encountered a problem with the on() and off() method.
At the end of a game some buttons are switched of:
- if (good == all){
- $(".knop").off("click");
- $(".knop").css({"cursor":"default"});
- }
This works good. However:
- $(".knopReset").click(function() {
- $(".knop").on("click");
- $(".knop").css({"cursor":"pointer"});
- })
doesn't set the buttons to work. The cursor becomes a pointer, but "click" is not activated.
What went wrong? Thanks in advance, Henk