diff --git a/README.md b/README.md index e999680..e18800c 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,7 @@ The first and only argument passed to these event handlers is the `modal` object modal.$elm; // Original jQuery object upon which modal() was invoked. modal.options; // Options passed to the modal. modal.$blocker; // The overlay element. +modal.$anchor; // The anchor originating the event. ``` So, you could do something like this: diff --git a/jquery.modal.js b/jquery.modal.js index 02c522d..73fde2d 100644 --- a/jquery.modal.js +++ b/jquery.modal.js @@ -181,7 +181,7 @@ //Return context for custom events _ctx: function() { - return { elm: this.$elm, $elm: this.$elm, $blocker: this.$blocker, options: this.options }; + return { elm: this.$elm, $elm: this.$elm, $blocker: this.$blocker, options: this.options, $anchor: this.anchor }; } };