Glen,
I have never done it, but I say a while back that you can use the
jQuery.extend method to overwrite a default method.  I will see if I can dig
that up, but that may point you in the right direction in the mean time.

On 1/8/08, Glen Lipka <[EMAIL PROTECTED]> wrote:
>
> Right now in 1.2.1 the JSONP method uses an asynchronous call to do it's
> thing.
> This sometimes causes a problem when we are sending a call about a "click"
> event on a link.  The page unloads before the JSONP is finished.
>
> Changing it to be optional (async or synchronous) helps fix that problem.
>
> Code we used inside jQuery (with a param call to .ajax)
>
> /* If the request is not async, we need to wait for the script to l oad
> before returning. */
> else if (!s.async) {
>   var done = false;
>   // Attach handlers for all browsers
>     script.onload = script.onreadystatechange = function(){
>       if ( !done && (!this.readyState ||
>         this.readyState == "loaded" || this.readyState == "complete") ) {
>       }
>     };
>   }
>
> QUESTION:  Putting this directly into our copy of jQuery is probably a bad
> idea.  *How can this be turned into a plugin?*
>
> Thanks much,
>
> Glen
>



-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com

Reply via email to