Make bootstrap popover work with custom html template

后端 未结 3 805
暖寄归人
暖寄归人 2021-02-05 04:38

I am using an input group textbox and I need the Bootstrap 3 popover to work and the popover template should be defined &n designed by me. So the html I have currently with

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-05 04:50

    @code-jaff that is a great answer, but i noticed that the Working Demo's popover doesn't look like it's coming out of the button. If this is happening to anyone else, try adding container: 'body' to the popover options. Like this:

    $('body').popover({
        selector: '[rel=popover]',
        trigger: 'click',
        content: content,
        template: popoverTemplate,
        placement: "bottom",
        html: true,
        container: 'body'
    });
    

提交回复
热议问题