diff --git a/docs/patterns/jquery.rst b/docs/patterns/jquery.rst
index cb5aa234..8d00f54e 100644
--- a/docs/patterns/jquery.rst
+++ b/docs/patterns/jquery.rst
@@ -6,7 +6,16 @@ with the DOM and JavaScript in general. It is the perfect tool to make
web applications more dynamic by exchanging JSON between server and
client.
+JSON itself is a very lightweight transport format, very similar to how
+Python primitives (numbers, strings, dicts and lists) look like which is
+widely supported and very easy to parse. It became popular a few years
+ago and quickly replaced XML as transport format in web applications.
+
+If you have Python 2.6 JSON will work out of the box, in Python 2.5 you
+will have to install the `simplejson`_ library from PyPI.
+
.. _jQuery: http://jquery.com/
+.. _simplejson: http://pypi.python.org/pypi/simplejson
Loading jQuery
--------------
@@ -14,15 +23,27 @@ 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 two script statements to your `head` section. One for jQuery, and
-one for your own script (called `app.js` here):
+to add a script statement to your `head` to load jQuery:
.. sourcecode:: html
-
+ url_for('static', filename='jquery.js') }}">
+
+Another method is using Google's `AJAX Libraries API
+
+ + = + ? +
calculate server side
+
+I won't got into detail here about how jQuery works, just a very quick
+explanation of the little bit of code above:
+
+1. ``$(function() { ... })`` specifies code that should run once the
+ browser is done loading the basic parts of the page.
+2. ``#('selector')`` selects an element and lets you operate on it.
+3. ``element.bind('event', func)`` specifies a function that should run
+ when the user clicked on the element. If that function returns
+ `false`, the default behaviour will not kick in (in this case, navigate
+ to the `#` URL).
+4. ``$.getJSON(url, data, func)`` sends a `GET` request to `url` and will
+ send the contents of the `data` object as query parameters. Once the
+ data arrived, it will call the given function with the return value as
+ argument. Note that we can use the `$SCRIPT_ROOT` variable here that
+ we set earlier.
+
+If you don't get the whole picture, download the `sourcecode
+for this example
+ calculate server side
+{% endblock %}
diff --git a/examples/jqueryexample/templates/layout.html b/examples/jqueryexample/templates/layout.html
new file mode 100644
index 00000000..0b5f3a7e
--- /dev/null
+++ b/examples/jqueryexample/templates/layout.html
@@ -0,0 +1,10 @@
+
+