1
我認爲這會很簡單,但有些事情是錯誤的。唯一使用的Bootstrap寶石是simple form one。Twitter Bootstrap工具提示不工作?
我有以下的html:
應用程序/視圖/用戶/ new.html.erb
<div id="hint">hint</div>
然後在我的的application.js文件的javascript我有:
在Twitter Bootstrap Tooltip Instructions它說只是把這個:
$('#example').tooltip(options)
但我沒有得到任何東西。我如何使用它?
ANSWER
我不得不這樣做是爲了得到它的工作:
<div id="hint">
<a href="#" rel="tooltip" title="some content">hint</a>
</div>
jQuery(function($) {
$("#hint a").tooltip()
});
這仍然有效,可能是我找到的最好的 – Abhinay