TypeError: $.get is not a function

瀏覽次數:55 次
跳到第一則未讀訊息

ajay

未讀,
2016年7月25日 上午8:50:182016/7/25
收件者:Django users
//In scirpt
$('#suggest').keyup(function ()
{
var query = $('#suggest').value;

$.get("/search/", {suggest:query},function( data ){
$("#list").html( {% for item in search_list %}
'<li>'+{{ item }}+ '</li>'
{% endfor %} )


});


In body

<input type="text" id="suggest" >
<div id="list">
</div>

am i doing something wrong 
plz help

Gergely Polonkai

未讀,
2016年7月25日 上午10:35:162016/7/25
收件者:Django users
This sounds to be a JavaScript problem, which is not part of Django in any ways.

My idea, however, is that you don’t import another JS file that contains the $ function (probably jQuery or Prototype?)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f874db3a-1e19-4cef-9deb-9beed11159d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ludovic coues

未讀,
2016年7月25日 下午1:30:322016/7/25
收件者:django...@googlegroups.com
$.get look a lot like Jquery.

Do you mind to share what version you are using ? You can find out with `alert($.fn.jquery)`


For more options, visit https://groups.google.com/d/optout.



--

Cordialement, Coues Ludovic
+336 148 743 42
回覆所有人
回覆作者
轉寄
0 則新訊息