我有一个jQuery工具提示,应该将鼠标悬停在我的表头上。它显示在我屏幕的最左侧,没有格式化 - 只是黑色文本。我尝试使用放置和位置jquery属性无济于事。代码:
.container
.row
.col-sm-12
%ol.breadcrumb
%li
= link_to 'Dashboard', dashboard_index_path
%li
= link_to 'Phase 3', phase_path( 3 )
%li
= link_to 'Step 1', phase_step_path( @phase, @step )
%li
Activity 3: Treatment Adaptations Table
.row
.col-sm-12
%h1
Activity 3: Treatment Adaptations Table
%p
To review instructions, see
= link_to 'Phase 3 Step 1 guide', phase_step_path( @phase, @step )
%table.table.table-bordered
%thead
%th{"data-toggle" => "tooltip", "title" => "tooltip"}
Specify reason(s) for the adaptation
%th{"data-toggle" => "tooltip", "title" => "tooltip"}
Identify any specific concerns about the adaptation
%th{"data-toggle" => "tooltip", "title" => "tooltip"}
How will concerns be addressed?
%th{"data-toggle" => "tooltip", "title" => "tooltip"}
Specify how the adaptation will be made
%th{"data-toggle" => "tooltip", "title" => "tooltip"}
Who will carry out the adaptation?
jQuery的:
$('[data-toggle="tooltip"]').tooltip({
'placement': 'top'
});
答案 0 :(得分:0)
如果您可以发布jsfiddle链接,它将更容易获得帮助。您的HAML文件可以编译成一些不能在本地轻松生成的html(没有所有这些变量)