单击引导链接内的插入符号图标不起作用

时间:2016-08-12 12:57:28

标签: javascript jquery html css twitter-bootstrap

使用Bootstrap v3.3.7和jQuery v1.12.4,我创建了一个激活HTML popover的组件。

请参阅以下代码。

单击该按钮可激活弹出窗口。但是,单击按钮内的插入符号图标不会执行任何操作。知道为什么以及如何解决这个问题?

Click here for the jsfiddle

<a role="button" class="btn btn-default po" data-poc="#html1">Test 1 <span class="caret"></span></a>
<a role="button" class="btn btn-default po" data-poc="#html2">Test 2 <span class="caret"></span></a>
<div id="html1" class="hide">
  <strong>This</strong> is a test!
</div>
<div id="html2" class="hide">
  <strong>This</strong> is another test!
</div>

1 个答案:

答案 0 :(得分:3)

使用此

<a id="po1" class="btn btn-default" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Test <span class="caret"></span></a>

click here