> I took this great idea and went ahead implementing it on a few sites I
> maintain using different syntax.

It's more than a syntax change; it's entirely different semantics.
Your version fetches a copy of jQuery asynchronously. If there is
a .ready() handler below that block of code, jQuery may not be loaded
by the time it is reached and you'll get errors. By using
document.write and a script tag, you can be guaranteed that the
browser won't proceed to run any code below it until it either loads
the script or gets an error back from the request (like a 404 or a
timeout).

I'd think the timeout situation is the most likely outcome when
Google's CDN is down, which means the user will see a blank screen for
30 to 60 seconds before it even reaches the document.write anyway. So
it seems like you'd need to load the Google CDN version asynchronously
to prevent that. But that raises the question of what to show the user
while it's trying to find a reachable version of jQuery...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
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