Bootstrap 3 Tooltips or Popovers doesn't work

后端 未结 3 653
执念已碎
执念已碎 2021-01-11 11:17

I have a Django application with the front-end designed in Twitter Bootstrap 3. All of the my styling and JS is working fine including the modals, etc... But I cannot for th

相关标签:
3条回答
  • 2021-01-11 11:42

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

    One way to initialize all popovers on a page would be to select them by their data-toggle attribute:

        $(function () {
      $('[data-toggle="popover"]').popover()
    })
    
    0 讨论(0)
  • 2021-01-11 11:50

    Tooltips must be initialized with jQuery:

    <a href="#" data-toggle="tooltip" title="Hooray!">Hover over me</a>
    
    <script>
    $(document).ready(function(){
        $('[data-toggle="tooltip"]').tooltip(); 
    });
    </script>
    

    Check this link

    0 讨论(0)
  • 2021-01-11 11:58

    You just need to enable the tooltip via javascript:

    $('some id or class that you add to the above a tag').tooltip()
    
    0 讨论(0)
提交回复
热议问题