diff options
author | Trent Richardson <trentdrichardson@gmail.com> | 2014-09-05 10:07:59 -0400 |
---|---|---|
committer | Trent Richardson <trentdrichardson@gmail.com> | 2014-09-05 10:07:59 -0400 |
commit | 8e79271360bc83f78765850f1a134c79a16be1c3 (patch) | |
tree | a08dccc2027965337549ecff0e487f135da55df6 /src | |
parent | 7ae25e1a470d66e4474446a9303a7d2fdaf47a64 (diff) | |
download | jQuery-Impromptu-8e79271360bc83f78765850f1a134c79a16be1c3.zip jQuery-Impromptu-8e79271360bc83f78765850f1a134c79a16be1c3.tar.gz jQuery-Impromptu-8e79271360bc83f78765850f1a134c79a16be1c3.tar.bz2 |
Fixes examples causing error
Diffstat (limited to 'src')
-rw-r--r-- | src/demos/purecss.html | 12 | ||||
-rw-r--r-- | src/demos/survey.html | 12 | ||||
-rw-r--r-- | src/demos/twitter_bootstrap.html | 12 | ||||
-rw-r--r-- | src/index.html | 2 | ||||
-rw-r--r-- | src/jquery-impromptu.js | 4 |
5 files changed, 24 insertions, 18 deletions
diff --git a/src/demos/purecss.html b/src/demos/purecss.html index aba14f0..e07c4bd 100644 --- a/src/demos/purecss.html +++ b/src/demos/purecss.html @@ -90,11 +90,13 @@ $.prompt(temp,{ close: function(e,v,m,f){ - var str = "You can now process with this given information:<br />"; - $.each(f,function(i,obj){ - str += i + " - <em>" + obj + "</em><br />"; - }); - $('#results').html(str); + if(v !== undefined){ + var str = "You can now process with this given information:<br />"; + $.each(f,function(i,obj){ + str += i + " - <em>" + obj + "</em><br />"; + }); + $('#results').html(str); + } }, classes: { box: '', diff --git a/src/demos/survey.html b/src/demos/survey.html index 892d9ce..d4f8c3f 100644 --- a/src/demos/survey.html +++ b/src/demos/survey.html @@ -80,11 +80,13 @@ $.prompt(temp,{ close: function(e,v,m,f){ - var str = "You can now process with this given information:<br />"; - $.each(f,function(i,obj){ - str += i + " - <em>" + obj + "</em><br />"; - }); - $('#results').html(str); + if(v !== undefined){ + var str = "You can now process with this given information:<br />"; + $.each(f,function(i,obj){ + str += i + " - <em>" + obj + "</em><br />"; + }); + $('#results').html(str); + } } }); } diff --git a/src/demos/twitter_bootstrap.html b/src/demos/twitter_bootstrap.html index f523287..eca1583 100644 --- a/src/demos/twitter_bootstrap.html +++ b/src/demos/twitter_bootstrap.html @@ -90,11 +90,13 @@ $.prompt(temp,{ close: function(e,v,m,f){ - var str = "You can now process with this given information:<br />"; - $.each(f,function(i,obj){ - str += i + " - <em>" + obj + "</em><br />"; - }); - $('#results').html(str); + if(v !== undefined){ + var str = "You can now process with this given information:<br />"; + $.each(f,function(i,obj){ + str += i + " - <em>" + obj + "</em><br />"; + }); + $('#results').html(str); + } }, classes: { box: '', diff --git a/src/index.html b/src/index.html index 62c14c7..c05b582 100644 --- a/src/index.html +++ b/src/index.html @@ -314,7 +314,7 @@ myPrompt.on('impromptu:loaded', function(e){});</pre> $.prompt.getStateContent('state2') .on('impromptu:submit', function(e,v,m,f){});</pre></dd> - <dt>impromptu:closing</dt> + <dt>impromptu:close</dt> <dd>Same as close option. Scope is entire prompt and fade container</dd> <dt>impromptu:statechanging</dt> diff --git a/src/jquery-impromptu.js b/src/jquery-impromptu.js index a4029d1..649f00a 100644 --- a/src/jquery-impromptu.js +++ b/src/jquery-impromptu.js @@ -185,7 +185,7 @@ $.prompt.jqi.find('.'+ opts.prefix +'close').click($.prompt.close);
$.prompt.jqib.on("keydown",keyDownEventHandler)
.on('impromptu:loaded', opts.loaded)
- .on('impromptu:closing', opts.close)
+ .on('impromptu:close', opts.close)
.on('impromptu:statechanging', opts.statechanging)
.on('impromptu:statechanged', opts.statechanged);
@@ -688,7 +688,7 @@ if($.prompt.jqib){
$.prompt.jqib.fadeOut('fast',function(){
- $.prompt.jqib.trigger('impromptu:closing', [clicked,msg,formvals]);
+ $.prompt.jqib.trigger('impromptu:close', [clicked,msg,formvals]);
$.prompt.jqib.remove();
|