Skip to content

Commit

Permalink
Bind to links with multiple rel values
Browse files Browse the repository at this point in the history
Resolves #135
  • Loading branch information
kylefox committed Sep 11, 2016
1 parent fdab6b7 commit c6fc99c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jquery.modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@
};

// Automatically bind links with rel="modal:close" to, well, close the modal.
$(document).on('click.modal', 'a[rel="modal:close"]', $.modal.close);
$(document).on('click.modal', '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
2 changes: 1 addition & 1 deletion jquery.modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c6fc99c

Please sign in to comment.