2015-08-15 41 views
0
<div class="form-group"> 
    <label>Input</label> 
    <input type="text" class="form-control typeahead" placeholder="Type few letters" autocomplete="off" spellcheck="false"> 
</div> 

懸停和代碼試圖捉對TT-建議

$('.tt-suggestion').on('mouseover', function(){ 
    // verify input 
    console.log('got it'); 
}); 

我無法趕上鼠標懸停在預輸入的建議。

typeahead:cursorchanged僅適用於鍵盤選擇 而.on('hover')只是忽略了移動。

有什麼建議嗎? (未TT的:d)

這樣吧 - manemoi 西奧多

+0

哪裏是你的代碼? –

+0

@AbdelrahmanWahdan添加代碼 –

回答

1

只要我明白你的問題,你可以使用這個語法來代替:

$(document).on('mouseover', '.tt-suggestion', function(){ 
     console.log("got it"); 
    }); 
+0

他和你的功能有什麼區別。無法弄清楚他爲什麼不工作。 – mhlavacka