I'm pretty sure this is possible, but I couldn't seem to put my finger
on how to do it properly. What I'm looking to do is create either
functions or jQuery methods with a custom callback functionality, that
would work in the same way as the built-in callbacks for fadeIn,
slideDown, etc.

For example:

$.fn.testFunc = function(param, callback){
//do something that delays, like a fadeIn (just using the fadeIn as an
example, but since the fadeIn already has callback functionality, it's
not an ideal choice, but I hope you get my point)
callback();
}

So that this could be called like so, and the callback would execute
after the rest of the code was finished

$(obj).testFunc(param, function(){
//do some more stuff
}

I've tried tinkering with the $.fn.queue method but I was unable to
get it to work for me.

Any ideas?

Thanks.

Reply via email to