jQuery Impromptu has a secret weapon, buttons! Many modals tools you must create your own, or jump through hoops to add them with events. Impromptu was built around buttons. In it’s simplest form, buttons can be passed as key/value pairs like so:

$.prompt('Example 2',{ 
	buttons: { Ok: true, Cancel: false }
});

This is all fine and dandy, but lets be honest. We need descriptive buttons that direct the user in certain directions. Perhaps you need them to be dynamic with internationalization options. Whatever the case, you need more power. The power has been here all along, but it lays low. Here is how you can create more customized buttons.

$.prompt('Hello World!!',{
	buttons:[
			{title: 'Hello World',value:'Hey there' },
			{title: 'Good Bye',value:'Later gator' }
		] 
});

This enables you to set the title and value of the buttons to variables rather than static values. With this approach you can also add classes to your buttons:

$.prompt('Hello World!!',{
	buttons:[
			{title: 'Hello World',value:'Hey there', classes: 'active' },
			{title: 'Good Bye',value:'Later gator', classes: ['c1', 'c2'] }
		] 
});

You can also set “classes” with a string or array of class names to be included in your buttons. This makes customizations and theming unlimited.

Want one more hidden gem? You got it! If you don’t want any buttons at all, pass an empty object:

$.prompt('Hello World!!',{
	buttons:{}
});

I hope this helps with utilizing the power of Impromptu. Enjoy!