How to dismiss a Twitter Bootstrap popover by clicking outside?

Update: A slightly more robust solution: http://jsfiddle.net/mattdlockyer/C5GBU/72/ For buttons containing text only: $(‘body’).on(‘click’, function (e) { //did not click a popover toggle or popover if ($(e.target).data(‘toggle’) !== ‘popover’ && $(e.target).parents(‘.popover.in’).length === 0) { $(‘[data-toggle=”popover”]’).popover(‘hide’); } }); For buttons containing icons use (this code has a bug in Bootstrap 3.3.6, see the fix below in this … Read more

HTML inside Twitter Bootstrap popover

You cannot use <li href=”#” since it belongs to <a href=”#” that’s why it wasn’t working, change it and it’s all good. Here is working JSFiddle which shows you how to create bootstrap popover. Relevant parts of the code is below: HTML: <!– Note: Popover content is read from “data-content” and “title” tags. –> <a … Read more