Why not take advantage of jquery's event mechanism and do an event
based api, like:
$("#sel").testStatus(opt).bind("statusupdated.testStatus",function()
{
//dostuff
});
then in your plugin:
if (question) {
$.ajax({
type: 'POST',
url: itemHref + defaults.status
I would add it as an option and set its default value to an empty function:
var defaults = {
status: '?action=live',
onComplete: function() {}
}
That way you could safely call onComplete when ready and it will either do
nothing or call the user-supplied function.
-Hector
On Thu, Nov 6,
2 matches
Mail list logo