diff options
author | Trent Richardson <trentdrichardson@gmail.com> | 2014-12-10 11:13:29 -0500 |
---|---|---|
committer | Trent Richardson <trentdrichardson@gmail.com> | 2014-12-10 11:13:29 -0500 |
commit | ea6267b25d7cbb1bfc739fdb75db1c5b2aca572b (patch) | |
tree | 5962a27cff3da13816104e89fce98078ad7d4f8b /src/jquery-impromptu.js | |
parent | 3002c704116baab9c89c8ff0d1de10961729bcb1 (diff) | |
download | jQuery-Impromptu-ea6267b25d7cbb1bfc739fdb75db1c5b2aca572b.zip jQuery-Impromptu-ea6267b25d7cbb1bfc739fdb75db1c5b2aca572b.tar.gz jQuery-Impromptu-ea6267b25d7cbb1bfc739fdb75db1c5b2aca572b.tar.bz2 |
Update docs and adds method getApi to help when using $.prompt stack
Diffstat (limited to 'src/jquery-impromptu.js')
-rw-r--r-- | src/jquery-impromptu.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/jquery-impromptu.js b/src/jquery-impromptu.js index 34d07b6..e46a53d 100644 --- a/src/jquery-impromptu.js +++ b/src/jquery-impromptu.js @@ -156,7 +156,7 @@ '</div>';
t.jqib = $(msgbox).appendTo($body);
- t.jqi = t.jqib.children('.'+ opts.prefix);//.data('jqi',opts);
+ t.jqi = t.jqib.children('.'+ opts.prefix);
t.jqif = t.jqib.children('.'+ opts.prefix +'fade');
//if a string was passed, convert to a single state
@@ -480,7 +480,15 @@ },
/**
- * get - Get the box containing fade and prompt
+ * getApi - Get the api, so you can extract it from $.prompt stack
+ * @return jQuery - the prompt
+ */
+ getApi: function() {
+ return this;
+ },
+
+ /**
+ * getBox - Get the box containing fade and prompt
* @return jQuery - the prompt
*/
getBox: function() {
@@ -488,7 +496,7 @@ },
/**
- * get - Get the prompt
+ * getPrompt - Get the prompt
* @return jQuery - the prompt
*/
getPrompt: function() {
@@ -758,7 +766,7 @@ $.prompt = function(message, options){
var api = new Imp();
$.prompt.lifo.push(api);
-
+
api.open.apply(api, arguments);
return api.jqi;
};
|