FlyingCat
FlyingCat

Reputation: 14270

How to enable bootstrap popover feature?

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!

Upvotes: 0

Views: 1703

Answers (1)

hsz
hsz

Reputation: 152226

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

Upvotes: 1

Related Questions