Skip to content

Commit

Permalink
Merge pull request #37 from bensmithett/master
Browse files Browse the repository at this point in the history
Namespace automatic click event handlers
  • Loading branch information
kylefox committed Feb 6, 2013
2 parents 84b9e74 + 08cfc99 commit 3aba9bf
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 3aba9bf

Please sign in to comment.