diff options
author | Trent Richardson <trentdrichardson@gmail.com> | 2013-08-08 15:14:40 -0400 |
---|---|---|
committer | Trent Richardson <trentdrichardson@gmail.com> | 2013-08-08 15:14:40 -0400 |
commit | dd0f346849938d9f386eeb222c11bbcf622acba2 (patch) | |
tree | 879e970b728cbf788c54a837d53995251666f3c9 | |
parent | aeff218c778541110c6bd40888803370dcd9cc50 (diff) | |
download | jQuery-Impromptu-dd0f346849938d9f386eeb222c11bbcf622acba2.zip jQuery-Impromptu-dd0f346849938d9f386eeb222c11bbcf622acba2.tar.gz jQuery-Impromptu-dd0f346849938d9f386eeb222c11bbcf622acba2.tar.bz2 |
Issue #17 Fixes error in IE8
-rw-r--r-- | index.html | 10 | ||||
-rw-r--r-- | jquery-impromptu.js | 3 |
2 files changed, 7 insertions, 6 deletions
@@ -298,25 +298,25 @@ <p>If you like to bind events manually you can do so with the following:</p> <dl class="methoddl"> - <dt>promptloaded</dt> + <dt>impromptu:loaded</dt> <dd>Same as loaded option. Scope is the entire prompt and fade container. <pre>var myPrompt = jQuery.prompt(/*...*/); myPrompt.bind('promptloaded', function(e){});</pre> </dd> - <dt>promptsubmit</dt> + <dt>impromptu:submit</dt> <dd>Same as submit option. Scope is the state element. These events are per state, so you must attach it directly to a state. <pre>var myPrompt = jQuery.prompt(/*...*/); $.prompt.getStateContent('state2') .bind('promptsubmit', function(e,v,m,f){});</pre></dd> - <dt>promptclose</dt> + <dt>impromptu:close</dt> <dd>Same as close option. Scope is entire prompt and fade container</dd> - <dt>promptstatechanging</dt> + <dt>impromptu:statechanging</dt> <dd>Same as statechangin option. Scope is the entire prompt and fade container. This fires before the state changes, so you may return false or use e.preventDefault() prevent the state change.</dd> - <dt>promptstatechanged</dt> + <dt>impromptu:statechanged</dt> <dd>Same as statechanged option. Scope is the entire prompt and fade container. This fires after the state has successfully changed.</dd> </dl> diff --git a/jquery-impromptu.js b/jquery-impromptu.js index 9e11f3c..ca0a186 100644 --- a/jquery-impromptu.js +++ b/jquery-impromptu.js @@ -322,7 +322,8 @@ $.prompt.position = function(e){
var restoreFx = $.fx.off,
$state = $.prompt.getCurrentState(),
- pos = $.prompt.options.states[$state.data('jqi-name')].position,
+ stateObj = $.prompt.options.states[$state.data('jqi-name')],
+ pos = stateObj? stateObj.position : undefined,
$window = $(window),
bodyHeight = $.prompt.outerSize($(document.body), true).h,
windowHeight = $(window).height(),
|