admin管理员组

文章数量:1334190

I have a non-bootstrap project which requires popover functionality.

I'd like to use bootstrap's popovers, but don't want to include all of bootstrap, since I'll only be using this one feature. I'd also be open to suggestions for a different standalone popover widget.

Bootstrap's popover are described here, with examples:

My questions are:

  1. Which bootstrap CSS definitions will I need to extract from the source?
  2. Since the bootstrap customizer is not yet available, do I just need to use the file tooltip.js, or are there some other base js files I'll need to include?

Thanks!

I have a non-bootstrap project which requires popover functionality.

I'd like to use bootstrap's popovers, but don't want to include all of bootstrap, since I'll only be using this one feature. I'd also be open to suggestions for a different standalone popover widget.

Bootstrap's popover are described here, with examples:

http://getbootstrap./javascript/#popovers

My questions are:

  1. Which bootstrap CSS definitions will I need to extract from the source?
  2. Since the bootstrap customizer is not yet available, do I just need to use the file tooltip.js, or are there some other base js files I'll need to include?

Thanks!

Share Improve this question asked Aug 7, 2013 at 2:44 JonahJonah 16.2k23 gold badges93 silver badges169 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 10
  1. Here's a fiddle with the relevant snippets of Bootstrap. The relevant classes are:

    .popover
    .popover.top
    .popover.right
    .popover.bottom
    .popover.left 
    .popover-title 
    .popover-content 
    .popover .arrow
    .popover .arrow:after
    .popover .arrow
    .popover .arrow:after
    .popover.top .arrow
    .popover.top .arrow:after
    .popover.right .arrow
    .popover.right .arrow:after
    .popover.bottom .arrow
    .popover.bottom .arrow:after
    .popover.left .arrow
    .popover.left .arrow:after
    
  2. Yes, since popover extends tooltip. And you'll need jQuery if you're not already using it.

I've also heard some nice things about qTip2.

本文标签: javascriptHow To Extract Bootstrap39s Popover FunctionalityStack Overflow