3

I'm using Twitter Bootstrap 2.3.2 and I'm registering a popover to open whenever a td with a selector is hovered over. However I have noticed within the console that the content callback is being trigger twice. Is there a way to prevent this from happening?

$('#table-data').popover({
    selector: '.td-popover',
    trigger : 'hover',
    content : function () {
        console.log(this, arguments)
        return 'hello';
    }
});

<table id="table-data">
    <tbody>
        <tr>
            <td></td>
            <td class="td-popover"></td>
            <td></td>
            <td class="td-popover"></td>
        </tr>
    </tbody>
</table>
gawpertron
  • 1,867
  • 3
  • 21
  • 37

1 Answers1

3

your code is correct, this issue comes from bootstrap itself, they say that it is an intentional behavior and not a bug. see this github issue for more details https://github.com/twbs/bootstrap/issues/12563

FYI they didn't change this behavior in Bootstrap 3.2 (which is the current stable release), but I think that they plan to do it in the next one (3.2.1)

amine
  • 502
  • 5
  • 14
  • 1
    Yeah they seem uninterested in fixing it, and its not documented as far as I can discover. Poor form, twitter. – Shayne Sep 23 '14 at 06:53