title: formset() is not a function, typeerror using jquery.formset.js
body: <p>I'm using jquery.formset.js to try and dynamically add and delete rows to my formset. </p>
  
  <p><a href="https://github.com/elo80ka/django-dynamic-formset" rel="nofollow noreferrer">https://github.com/elo80ka/django-dynamic-formset</a></p>
  
  <p>I'm getting an error in Chrome developer tools:</p>
  
  <pre><code>Uncaught TypeError: $(...).formset is not a function(…)
  </code></pre>
  
  <p>And I don't get why... Here is what my template looks like with my script defined at the bottom and link to jquery.formset.js.</p>
  
  <pre><code>{% extends 'project/base.html' %}
  {% block title %}...{% endblock %}
  {% load staticfiles %}
  
  {% block content %}
  
  &lt;form id="time-form" method="POST" action="" class="dynamic-form" enctype="multipart/form-data"&gt;{% csrf_token %}
      &lt;div style="overflow-x:auto; padding-bottom:0;"&gt;
          &lt;table id="timesheet" class="tables"&gt;
              &lt;tbody&gt;
                  &lt;tr class="table-header"&gt;
                      &lt;th&gt;Date&lt;/th&gt;
                      &lt;th colspan="2"&gt;Description&lt;/th&gt;
                  &lt;/tr&gt;
                      {{ time_formset.management_form }}
                      {% for form in time_formset %}
                          &lt;tr class="formset_row"&gt;
                              {% for field in form.visible_fields %}
                                  &lt;td&gt;
                                      {# Include the hidden fields in the form #}
                                      {% if forloop.first %}
                                          {% for hidden in form.hidden_fields %}
                                              {{ hidden }}
                                          {% endfor %}
                                      {% endif %}
                                      {{ field.errors.as_ul }}
                                      {{ field }}
                                  &lt;/td&gt;
                                  {% if forloop.last %}
                                      {% if form.instance.pk %}&lt;td&gt;{{ form.DELETE }}&lt;/td&gt;{% endif %}
                                  {% endif %}
                              {% endfor %}
                          &lt;/tr&gt;
                      {% endfor %}
                  &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
      &lt;/br&gt;
      &lt;input type = "submit" id = "save" value = "Save"&gt;
  &lt;/form&gt;
  &lt;script type="text/javascript" src='/media/jquery.formset.js'&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static 'app/jquery.js' %}"&gt;&lt;/script&gt;
  &lt;script src="{% static 'app2/jquery-ui/external/jquery/jquery.js' %}"&gt;&lt;/script&gt;
  &lt;script src="{% static 'app2/jquery-ui/jquery-ui.js' %}"&gt;&lt;/script&gt;
  ...
  &lt;script&gt;
  $(function() {
  
      //ERROR RAISED HERE//
  
      $('#time-form div table#timesheet tbody tr.formset_row').formset({
          prefix: '{{ time_formset.prefix }}'
      });
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>I've checked that the js file is linked okay with an alert on document ready which has worked fine. And I've checked the element $ exists and it returns true. I'm not sure what is going wrong here?</p>
  
  <p>Note: my formset is an InLineFormSet</p>
  
  <pre><code>TimeFormSet = inlineformset_factory(TimeSheet, Time, form=TimeForm, extra=1, can_delete=True)
  </code></pre>
  
  <p>Help???</p>