simpleQ - jQuery Question Widget

Description

This jQuery plugin widget is usable to provide simple notifications and ask simple questions. It is aimed at a maximum of about 5 short answers. Each answer and the close button will trigger a callback function for handling the click.

Usage

$(someDiv).simpleQ({
	question_text: "This is the unchecked, directly presented text, may contain HTML. (Watch out for code injection!)",
	answers:[
	{ answer_text:"Answer 1",callback:function(){console.log("Callback on answer 1"); }},
	{ answer_text:"Answer 2",callback:function(){console.log("Callback on answer 2"); }}
	],
	close_callback:function(){console.log("Callback on close button")},
	removeOnAnswer:true|false
});
The "removeOnAnswer" flag determines if the question is removed from the DOM after an answer is selected.

Example

(Re)Open question.

License

Copyright: Ludo Stellingwerff, Almende B.V.
License: Apache License 2.0