Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Bootstrap popover, hide on click outside
- // add this on => data-trigger="focus"
- $('body').on('click', function (e) {
- $('[data-toggle=popover]').each(function () {
- // hide any open popovers when the anywhere else in the body is clicked
- if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
- $(this).popover('hide');
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement