From e6b9f509ba3c47f748d5c6da5f6de5500248dbfd Mon Sep 17 00:00:00 2001 From: Peter Manser Date: Mon, 20 Jun 2011 23:51:30 +0200 Subject: [PATCH] Improving documentation for loading jQuery. Now using Google CDN with fallback to local jQuery. --- docs/patterns/jquery.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/patterns/jquery.rst b/docs/patterns/jquery.rst index d4fe6d4e..f3c46e39 100644 --- a/docs/patterns/jquery.rst +++ b/docs/patterns/jquery.rst @@ -23,7 +23,7 @@ Loading jQuery In order to use jQuery, you have to download it first and place it in the static folder of your application and then ensure it's loaded. Ideally you have a layout template that is used for all pages where you just have -to add a script statement to your `head` to load jQuery: +to add a script statement to the bottom of your `` to load jQuery: .. sourcecode:: html @@ -35,15 +35,15 @@ Another method is using Google's `AJAX Libraries API .. sourcecode:: html - + + -In this case you don't have to put jQuery into your static folder, it will -instead be loaded from Google directly. This has the advantage that your +In this case you have to put jQuery into your static folder as a fallback, but it will +first try to load it directly from Google. This has the advantage that your website will probably load faster for users if they went to at least one other website before using the same jQuery version from Google because it -will already be in the browser cache. Downside is that if you don't have -network connectivity during development jQuery will not load. +will already be in the browser cache. Where is My Site? -----------------