0
我試圖讓我的simple_form
提示顯示爲twitter-bootstrap工具提示,以便只有當用戶選擇輸入字段或懸停在其上時纔會顯示提示。simple_form提示爲工具提示
形式的項目看起來像(在HAML):
:ruby
title = <<TITLE
This text is normally hidden and pops up as a bootstrap tooltip
only when the user hovers on the input field.
TITLE
= f.input :opt_out, hint: title
我的CSS和Javascript的simple_form是香草的提示,所以我覺得我必須修改config/initializers/simple_form.rb
初始化文件:
b.use :hint, :wrap_with => { :tag => :span, :class => :hint }