我已经在我的rails应用程序中实现了弹出窗口,方法是将以下内容放在我的application.js文件中
jQuery ->
$('[data-toggle="popover"]').popover();
在我看来,我有:
<button class="btn btn-default" data-toggle="popover" title="More Information" data-content=<%= subtask.description %>>Show More Details </button>
此行位于每个循环中,遍历每个子任务并将其打印在可折叠列表中。一切正常,除了数据内容不显示所有信息。例如,子任务描述可能是&#34;在x个时间内交付给客户。&#34;但是,popover只显示&#34; Deliver&#34;。我错过了什么吗?
答案 0 :(得分:1)
尝试
data-content="<%= subtask.description %>"