Usage

Include the libraries

Having this template

{% load jquery_tags %}
{% jquery_core_load %}
{% jquery_ui_load %}

Will output

<script type="text/javascript" src="/static/django_jquery/jquery-1.6.min.js"></script>
<link rel="stylesheet" href="/static/django_jquery/ui/1.8.16/themes/base/jquery-ui.css" type="text/css" media="all" />
<script type="text/javascript" src="/static/django_jquery/ui/1.8.16/jquery-ui-min.js"></script>

The template tags from jquery_tags has this optiosn:

jquery_core_load

{% jquery_core_load version %} renders the script tag for the jquery core library. It takes one param to describe the version, by default use the most recent version available.

For example

{% jquery_core_load 1.5 %}

Will output

<script type="text/javascript" src="/static/django_jquery/jquery-1.6.min.js"></script>

jquery_ui_load

{% jquery_ui_load version %} renders the script tag for the jquery core library. It takes one param to describe the version, the same as jquery_core_load use the most recent version available by default.

For example

{% jquery_ui_load 1.7 %}

Will output

<link rel="stylesheet" href="/static/django_jquery/ui/1.7.0/themes/base/jquery-ui.css" type="text/css" media="all" />
<script type="text/javascript" src="/static/django_jquery/ui/1.7.0/jquery-ui-min.js"></script>