2013-02-20 52 views
1

我使用這個代碼:Twitter的引導預輸入AJAX類型錯誤

$('.ajax-typeahead').typeahead({ 
    source: function(query, process) { 
     return $.ajax({ 
      url: $(this)[0].$element.data('link'), 
      type: 'get', 
      data: {q: query}, 
      dataType: 'json', 
      success: function(res) { 
       return process(res); 
      } 
     }); 
    } 
}); 

,當我鍵入輸入字段的東西我越來越:

bootstrap.min.js (line 1)

TypeError: a is undefined

有誰知道錯在哪裏時?

編輯:我更新到最新版本2.3,現在一切正常!

回答

0

我更新到最新版本2.3,現在一切正常!

+1

有沒有辦法讓我看到你的完整代碼?我一直試圖讓這個工作幾個星期,現在仍然是運氣! – Brian 2013-03-06 00:53:28