Bootstrap popover is not working

前端 未结 3 940
野性不改
野性不改 2021-02-06 22:41

The bootstrap popover is not showing up my page

Here is my HTML:

3条回答
  •  攒了一身酷
    2021-02-06 23:20

    From the Docs on Popovers:

    Opt-in functionality:
    For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.

    So you must call .popover() manually in JavaScript like this:

    $("[data-toggle=popover]").popover();
    

    Or you can use whatever selector you want

    Here's an example using StackSnippets.

    $("[data-toggle=popover]").popover();
    body {
      padding: 50px;
    }
    
    
    
    
    
    
    

    Note: This is similar to the answer to Bootstrap Tooltip Not Showing Up

提交回复
热议问题