问题
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