Skip to content

Commit

Permalink
Merge pull request #22 from dei79/master
Browse files Browse the repository at this point in the history
Added a new AJAX Event
  • Loading branch information
kylefox committed Jun 20, 2012
2 parents cb76e3c + b32de0b commit 3f68f34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jquery.modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
current.$elm.empty().append(html).on($.modal.CLOSE, remove);
current.hideSpinner();
current.open();
el.trigger($.modal.AJAX_COMPLETE);
}).fail(function() {
el.trigger($.modal.AJAX_FAIL);
current.hideSpinner();
el.trigger($.modal.AJAX_COMPLETE);
});
}
} else {
Expand Down Expand Up @@ -164,6 +166,7 @@
$.modal.AJAX_SEND = 'modal:ajax:send';
$.modal.AJAX_SUCCESS = 'modal:ajax:success';
$.modal.AJAX_FAIL = 'modal:ajax:fail';
$.modal.AJAX_COMPLETE = 'modal:ajax:complete';

$.fn.modal = function(options){
if (this.length === 1) {
Expand Down

0 comments on commit 3f68f34

Please sign in to comment.