I am writing a little plugin like this:
(function($){
$.fn.extend({
myplugin: function (callback) {
return this.each(function(){
$(this).one('load',function(){
// Manipulate Images
}) ;
}) ;
}
}) ;
})(jQuery);
I want to fire a callback after plugin finishes its job:
jQuery('img').myplugin({function(){
// Do something
}) ;
How can I do this?
Edit: It is still not solved, even I got a minus point because of my question found not clearly specified. But it must be obviously a little bit tricky solution. Are there any js ninja who can solve this?
Thank you!