It is indeed. You can't expect parameters though and you could get conflict with the actual parameters sent by the caller.
On Fri, Oct 3, 2008 at 5:03 PM, John Resig <[EMAIL PROTECTED]> wrote: > > > Finally, animate (in addition to the formal callback) calls any existing > > callback stored with jQuery.data and clears it. > > Same goes for Ajax by the way. > > ...and events, and each, and any plugin that wants to tap into the > system - it's not really a scalable solution. A more-generic solution > that is able to handle any method passed in to any callback would seem > to be better. > > Here's a quick example: > http://dev.jquery.com/~john/plugins/callback/<http://dev.jquery.com/%7Ejohn/plugins/callback/> > > // This addition: > for ( var fn in jQuery.fn ) (function(fn){ > if ( !jQuery[ fn ] ) { > jQuery[ fn ] = function(){ > var args = jQuery.makeArray(arguments); > return function(){ > var self = jQuery(this); > return self[ fn ].apply( self, args ); > }; > }; > } > })(fn); > > // Allows you to write code like this: > jQuery(function(){ > jQuery("#test").hide("slow", > jQuery.show("slow", jQuery.addClass("done"))); > }); > > Granted the result isn't chainable at the moment - and it doesn't work > in some cases where there's name conflicts (each, css) - but it's > something! > > --John > > > > -- Ariel Flesler http://flesler.blogspot.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---