0
我正在使用Jquery標籤 - 它從遠程JSON字符串獲取關鍵字列表 - 這工作正常。jQuery與Mod_Rewrite從somefile.php更改請求?q = foo到/ somefile/foo?
但是什麼現在我有了在這裏,而不是jQuery的「向下鑽取」鍵入其試圖做
somefile.php?q中的搜索查詢的情況= foo的
(富是你剛剛輸入的內容,這將向下鑽取的標籤列表,只在其中顯示那些「富」。
我使用Laravel 4,所以我需要根本上改變了ajax請求它,而不是/somefile/foo
。是否有任何w是否這樣做?我一直在瘋狂地尋找,但找不到解決方案。
僅供參考,這裏的標籤,它的代碼,我目前有:
$("#tags").tagit({
autocomplete: {delay: 0, minLength: 2},
allowSpaces: true,
onlyAvailableTags : false,
tagSource: function(search, showChoices)
{
var that = this;
$.ajax({
url: "/admin/keywords/autocomplete",
data: { term:search.term },
dataType: "json",
success: function(choices)
{
showChoices(that._subtractArray(choices, that.assignedTags()));
}
});
}
});