Impromptu 3.1 Coming This Week

Impromptu 3.1 is in the works now, and I plan to release it this week. As of now I am just looking to add a few features, so there are no real changes that should break any older versions. As of now I have 3 new changes/additions, one of which is a bug fix.

1) Add callbacks to nextState, prevState, and goToState functions.

2) Fix bug when cloning html for use like $('#selector').prompt(); In the source I needed to pass withDataAndEvents in the clone statement if specified in the options.

3) Ability to pass an object as button title and values. I've had this question a dozen times I'm sure, and the solution is really simple: How do I pass a dynamic value for the button text. The issue comes in that the text for the button is the key of a key value pair { key: value } and at first it doesn't seem possible. But you just have to declare your values before passing them to prompt like var button[key_variable] = true; I have now made it possible to pass an array of objects as the buttons:

$.prompt('some text'{
    buttons: [
        { title: 'some complex title', value: 1 },
        { title: 'another complex title', value: 2 },
        { title: 'easy title', value: 3 }

I've tried to pull these changes out of the requested fixes and additions, although I may be missed some, if so please don't hesitate to comment about it again.