Is there a \"global\" unbind function in jQuery, such that I\'d be able to remove all bound events from a given namespace? eg:
// assume these are the events bou
Truly you are looking for a magical global function but as always with magic you can only get illusion, in this case, of simplicity.
There is also jQuery solution using .live() or .delegate() (which is only variant of live()).
Using $("body").delegate("#foo", "click.myNs", func)
you also bind event and using $("#body").undelegate(".myNs")
you unbind it. I use here "body" element but ofcourse you can use any element that is ancestor of all elements you need binding on.
It will make your "unbinding" work faster but again it will make your events respond slower.