1

I have modal window, this modal window has events:

$(document).on('click', '#TaskOutcomesTab .has-attachments-image', function(){

After close popup, I want to clear this handler. I've found success in solution, but I want to make it more general

        $(document).off("click", "#task-details .has-attachments-image");
        $(document).off("click", "#task-details .no-attachments-image");
        $(document).off("click", "#TaskOutcomesTab .has-attachments-image");
        $(document).off("click", "#TaskOutcomesTab .no-attachments-image");

I wanna something like that:

$(document).off("click")

or

$(document).off("click", ".has-attachments-image")
Mohan Rajput
  • 522
  • 6
  • 19
Mediator
  • 13,836
  • 33
  • 104
  • 177

0 Answers0