title: Javascript file/Jquery not being rendered
body: <p>I'm pretty sure there's something wrong with the way I'm rendering the file because everything else looks pretty solid, please let me know if it's not. nothing is showing up on my bar where it should since I'm using keyup. Not even an error which I think means jquery is not being rendered. 
  Here;s my code</p>
  
  <p>javascript file</p>
  
  <pre><code>$(function(){
  
      $('#search').keyup(function() {
  
          $.ajax({
              type: "POST",
              url: "/search/",
              data: { 
                  'search_text' : $('#search').val(),
                  'csrfmiddlewaretoken' : $("input[name=csrfmiddlewaretoken]").val()
              },
              success: searchSuccess,
              dataType: 'html'
          });
  
      });
  
  });
  
  function searchSuccess(data, textStatus, jqXHR)
  {
      $('#search-results').html(data);
  }
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>{% csrf_token %}
        &lt;input type="text" id="search" name="search" /&gt;
  
        &lt;ul id="search-results"&gt;
  
        &lt;/ul&gt;
  </code></pre>
  
  <p>I'm matching id as search but nothing shows up</p>
  
  <p>my javascript file is in my static folder->another static->js>then ajax.js 
  so this is how I did <code>&lt;script src="{% static 'js/ajax.js' %}"&gt;&lt;/script&gt;
  </code></p>
  
  <p>Not sure if my python code is right, because it's not being rendered at all. 
  Here;s my python code</p>
  
  <pre><code>def search_titles(request):
      if request.method == "POST":
          search_text = request.POST['search_text']
      else:
          search_text = ""
  
      categories = Category.objects.filter(name__contains=search_text)
      return render_to_response('ajax_search.html',{'categories':categories})
  </code></pre>
  
  <p>ajax search.html is </p>
  
  <pre><code>{% if categories.count &gt; 0 %}
  
  {% for category in categories %}
      &lt;li&gt;&lt;a href="/category/{{post.category}}"&gt;{{ category.title }}&lt;/a&gt;&lt;/li&gt;
  {% endfor %}
  
  {% else %}
  
  &lt;li&gt;None to show!&lt;/li&gt;
  
  {% endif %}
  </code></pre>