How to enable bootstrap popover feature?

∥☆過路亽.° 提交于 2020-01-16 13:21:02

问题


I have a question with bootstrap v3 popover feature.

I know it might be an old question and I read through other threads and tried their ways but still don't know how to get it to work.

I have HTML like

<button type="button" class="testBtn btn btn-default" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
  Popover on left
</button>

JS

$('[data-toggle="popover"]').popover({trigger: 'hover','placement': 'top'});
$('.testBtn').popover();

I have also included

/bootstrap/3.1.1/js/bootstrap.min.js

and

boostrap.tooltip.js

in my code. I can't seem to get it to work. Can anyone give me a hint? Thanks so much!


回答1:


Instead of tooltip.js you should include popover.js.



来源:https://stackoverflow.com/questions/23896129/how-to-enable-bootstrap-popover-feature

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!