From 08cfc99988548d72b7785dab5bb577bf9a2e39cc Mon Sep 17 00:00:00 2001 From: Ben Smithett Date: Wed, 6 Feb 2013 13:46:22 +1100 Subject: [PATCH] Namespace automatically attached click event listeners --- jquery.modal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.modal.js b/jquery.modal.js index 5ceffdc..21403fd 100644 --- a/jquery.modal.js +++ b/jquery.modal.js @@ -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(); });