Skip to content

Commit

Permalink
Make $.concrete.clear_all_rules clear all concrete-bound events too
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamish Friedlander committed Nov 2, 2009
1 parent ae5fb02 commit 42475ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/jquery.concrete.events.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
// If none of the special handlers created a proxy, use the generic proxy
if (!proxies[name]) proxies[name] = this.build_event_proxy(name);

$(document).bind(event, proxies[name]);
$(document).bind(event+'.concrete', proxies[name]);
}
}
});
Expand Down
2 changes: 2 additions & 0 deletions src/jquery.concrete.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ var console;
clear_all_rules: function() {
// Remove proxy functions
for (var k in $.fn) { if ($.fn[k].concrete) delete $.fn[k] ; }
// Remove bound events - TODO: Make this pluggable, so this code can be moved to jquery.concrete.events.js
$(document).unbind('.concrete');
// Remove namespaces, and start over again
namespaces = $.concrete.namespaces = {};
},
Expand Down

0 comments on commit 42475ae

Please sign in to comment.