Bootstrap Popover Trigger and html option together do not work

Asked

Viewed 599 times

2

Does anyone know why when I put Trigger together with html:true or Popover stops working?

HTML:

<a href="#" class="popoverr" role="button" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue.">
   <i class="fa fa-money"></i> 10 Pontos
</a>

JS:

$(".popoverr").popover({
    html: true,
    trigger: 'focus' // comente o trigger para o popover funcionar.
});

http://jsfiddle.net/Rf2Dr/

1 answer

2


The focus makes more sense for inputs, not for elements.
My suggestion is to use both hover click.

$(".popoverr").popover({
    html: true,
    trigger: 'click hover'
});

http://jsfiddle.net/Rf2Dr/1/

  • Any difference if used only the hover? I always use Hover.. Good answer :)

  • 1

    @Ronnyamarante the hover only works well. The click is useful for "mobiles/tablets" that do not have hover

  • Good, I hadn’t thought of that hypothesis. :)

  • 1

    Perfect, I needed the click function also precisely because the project is mobile-ready.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.