None of the static jQuery methods are chainable, that is, return a
jQuery object. That rule applies only to instance methods.

Instance: $().someMethod
Static: $.someMethod

The plugin guide could be fixed to reflect that difference...

Jörn

On Thu, Oct 9, 2008 at 5:26 PM, Shade <[EMAIL PROTECTED]> wrote:
>
> I was playing around with the new XHR plugin system that will be out
> with 1.2.7/1.3, and I noticed something that seemed a little odd to
> me.
>
> I was using the ajaxSetup() function to change my transport, but I
> wanted to chain off the end of that call, and it doesn't work, because
> apparently ajaxSetup doesn't return the "jQuery" object.
>
> I had been reading and trying to diligently follow the Plugin
> Authoring guide here: http://docs.jquery.com/Plugins/Authoring
>
> which says: "Your method must return the jQuery object, unless
> explicity noted otherwise."
>
> Perhaps I'm missing something, and if so I apologize, but I would have
> expected ajaxSetup to be chainable since it's API definition doesn't
> *explicitly* say it isn't.  Is this a misunderstanding on my part, a
> documentation deficiency, or a possible suggestable improvement to
> ajaxSetup?
>
> Is there a reason why ajaxSetup shouldn't be chainable?
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to