summaryrefslogtreecommitdiffstats
path: root/dist/jquery-impromptu.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/jquery-impromptu.js')
-rw-r--r--dist/jquery-impromptu.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/dist/jquery-impromptu.js b/dist/jquery-impromptu.js
index fa173bf..ac9e146 100644
--- a/dist/jquery-impromptu.js
+++ b/dist/jquery-impromptu.js
@@ -159,7 +159,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
@@ -483,7 +483,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() {
@@ -491,7 +499,7 @@
},
/**
- * get - Get the prompt
+ * getPrompt - Get the prompt
* @return jQuery - the prompt
*/
getPrompt: function() {
@@ -761,6 +769,7 @@
$.prompt = function(message, options){
var api = new Imp();
$.prompt.lifo.push(api);
+
api.open.apply(api, arguments);
return api.jqi;
};
@@ -780,7 +789,7 @@
};
/**
- * Copy over static methods, not worth doing a loop over for just 2
+ * Copy over static methods
*/
$.each(Imp, function(k,v){
$.prompt[k] = v;