Is it possible to remove than add a click click event to a specific element? iee
I have $("#elem").click(function{//some behaviour}); , $(".elem").click(function{//some behaviour}); (there is more than one element), and my other getJson function getJson executed. I want to remove the click event from #elem and add it again after receiving from the getJson function, but keep both mouseenter and mouseleave events all the time?
Or maybe create an overlay so as not to click, as in modal windows? is this a better idea?
edit:
I saw some really good answers, but there is one detail that I did not specifically miss. There are more than one element, and I call the click function on className, and not on elementId, as I pointed out in the original question
source share