This plugin is obsolete. See the new status
at github.bililite.com/status.
Updated 2015-01-19 to allow $(console).status()
. Now at version 1.4.
Updated 2013-12-18 to use Promise
s. This necessitated removing the result
option and adding the returnPromise
.
Updated 2014-01-09 to add initialText
option and to document the markup used.
For the Kavanot editor I wanted to have a way to display messages (like "Text saved successfully") that would show up on screen then fade out, and a way to enter text (like the title, or editing commands if I ever get that working). I packaged that all together into a plugin could handle both, with an anticipated use like:
<textarea id=editor></textarea>
<div id=notifications></div>
And then do something like $('#notifications').status('Text saved');
and that briefly shows the message in the <div>
and then gradually fade out.
And for user input,
$('#notifications').status({
prompt: 'File Name:',
run: function (text) {
/* do something with text */
if (successful) return 'success message';
if (! successful) throw {message: 'failure message'};
}
});
displays the prompt and an input box then runs the function and displays the result (it automatically catches
the throw
n exception).
See the code on github.
See a demo.
Continue reading ‘New jQuery plugin,status
’ »