You must untie the same function. In your code, you disable another function with a similar size. To use the same function, first define it and save it, and then use the link to this variable in both bind and unbind . See http://jsfiddle.net/DJVX2/530/ for an update to your script showing that this works in your context. The basic idea is this:
// Define the callback var callback = function(ev) { ... }; // Bind the callback $(selector).bind('event', callback); // Unbind the callback $(selector).unbind('event', callback);
As with jQuery 1.7 (the newest version at the time of this writing), the preferred method of event binding is to use on and off as follows:
// Bind the callback $(selector).on('event', callback); // Unbind the callback $(selector).off('event', callback);
(Note that you can also pass another argument to delegate events. See more details.
source share