Skip to content

Commit

Permalink
Namespace automatically attached click event listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
bensmithett committed Feb 6, 2013
1 parent 84b9e74 commit 08cfc99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@
};

// Automatically bind links with rel="modal:close" to, well, close the modal.
$(document).on('click', 'a[rel="modal:close"]', $.modal.close);
$(document).on('click', 'a[rel="modal:open"]', function(event) {
$(document).on('click.modal', 'a[rel="modal:close"]', $.modal.close);
$(document).on('click.modal', 'a[rel="modal:open"]', function(event) {
event.preventDefault();
$(this).modal();
});
Expand Down

0 comments on commit 08cfc99

Please sign in to comment.