How do you disable the title in Twitter Bootstrap's popover plugin?

后端 未结 5 1941
悲哀的现实
悲哀的现实 2021-02-18 13:54

I\'m using popover to display an image which doesn\'t require a title. If you don\'t set \"title\", it still displays an area where the title would be. How do you turn this of

5条回答
  •  伪装坚强ぢ
    2021-02-18 14:24

    You can also write a function to remove the element:

    function removeTitle(){
      $('.popover-title').remove();
    }
    
    $("a[data-toggle=popover]")
      .popover({
         html: true,
         animation: true
    })
    .click(function(e) {
      removeTitle();
      e.preventDefault()
    })
    

提交回复
热议问题