Skip to content

Commit

Permalink
Merge branch 'zjr-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
kylefox committed Apr 6, 2013
2 parents 93140bd + b7c16e6 commit cf24354
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ Because there can be only one modal active at a single time, there's no need to

$.modal.close();

_TODO: this should be changed so that when called on a specific element, the element is returned (normal jQuery fashion)._

Similar to how links can be automatically bound to open modals, they can be bound to close modals using `rel="modal:close"`:

Expand Down Expand Up @@ -215,4 +214,4 @@ jQuery Modal is distributed under the [MIT License](Learn more at http:https://opensou
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 5 additions & 3 deletions jquery.modal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
A simple jQuery modal (http:https://github.com/kylefox/jquery-modal)
Version 0.5.2
Version 0.5.3
*/
(function($) {

Expand Down Expand Up @@ -136,7 +136,9 @@
if (!current) return;
if (event) event.preventDefault();
current.close();
var that = current.$elm;
current = null;
return that;
};

$.modal.resize = function() {
Expand Down Expand Up @@ -177,8 +179,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
10 changes: 8 additions & 2 deletions 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 cf24354

Please sign in to comment.