i know that load accepts a callback, but i want to understand how to
write a function that accepts a callback function 'cause i want to use
it in a plugin. I'm new to plugin development so this are my first
steps in understanding this concepts.

ok, so i tried a simple script just to understand how it works. so on
anchor click i want to pop an alert message with the value specified
in function arguments and as a callback i want to increase the font
size...but...i don;t really get it. some help will be appreciated :)

so i have this:

(function($){
        $.fn.extend({
                //function name
                itPops : function(value,callback){
                //return
                return this.each(function(){
                        var val = value;
                        $(this).click(function(){
                                alert(val);
                                return false;
                        })
                })
                }
        });
})(jQuery);


$(document).ready(function(){
        $('a').itPops(2,function(){
                $(this).css({'font-size':'23px'});
        });
});


so...can you shoe me pls on my code how should i do with that
callback? many thanks

Reply via email to