2015-10-18 64 views
3

我想实现我的苗条观点引导酥料饼,但到目前为止,它没有工作:enter image description here不能让引导酥料饼的工作,苗条

这里是我的苗条鉴于问题的一部分:

td = tournament.subscriptions.count 
td data: {container: body, html: true, content: hello, toggle: popover, placement: top, trigger: hover, title: dispo} 
    = tournament.subscriptions.where(status: "confirmed").count 

我我认为我尊重语法,但它仍然无法正常工作。有任何想法吗 ?

回答

1

问题是,您正尝试使用散列来定义td标记的属性。

这应该为你工作:

td data-container='body' data-html='true' data-content='hello' data-toggle='popover' data-placement='top' data-trigger='hover' title='dispo' 

几件事情要注意,修改后的td行:

  1. 所有除了title属性是数据的属性,所以我说“数据“给他们。
  2. 我假设“hello”和“dispo”应该是字符串,所以我引用了它们。如果这些实际上是变量,则只需使用"#{dispo}""#{hello}"

而如果你不这样做已经,一定要火popover方法,让您的popovers到实际工作:

$('[data-toggle="popover"]').popover();