Moopromptu - A Mootools Version of Impromptu

Sometimes my mind wonders and I just want to play with other technologies. This was one of those times. I'd been wanting to learn a little more about Mootools, especially after reading about their upcoming 1.3 release with a fast, new selector engine. So I figured what better way to learn a new framework than to jump in the deep end and convert one of my favorite jQuery plugins, Impromptu.

The journey was very educational. I found that I like and dislike some things about Mootools, but overall it was an enjoyable experience. I'll write up another post on my likes and dislikes, this post is about the Mootools version of Impromptu. So yep, there is now a Moopromptu! I've converted all the methods of the jQuery versions, and to my knowledge the only option which is irrelevant is the "show" option, simply because with Core there aren't any such functions. So to call this beast we have $prompt instead of $.prompt, and we must call .show(msg, options) to open the prompt. (because I decided give it as much of the Mootools feel as possible)

$'hello world!', {
    buttons: { Ok: true, Cancel: false }

If you need to create a new instance of Impromptu it would look like the following:

var myPrompt = new Impromptu();'hello world!');

And to access all the properties you would call them just like with the jQuery version:

// etc...

Really the only difference is $.prompt converts to $prompt, and to show it you call $ Moopromptu only requires Core, so there are no real requirements. This is the first version, and my first Mootools plugin, so if any Mootools gurus out there notice I've not done something the Mootools way, let me know, or if you find a bug let me know, or if you just want to let me know how awesome Impromptu is (and I know it is) let me know :) Enjoy!!

Impromptu Downloads and Documentation