Keep focus on boot

I look at using the Bootstrap Popover widget, and although I like that this is one thing I would like to see is the ability to place hyperlinks or buttons in the contents of the popover body. Actually place them there, but the problem is that the user can click on them.

In particular, the problem is that with the default settings, in any case - as soon as you leave the link and move to it, it disappears. Is there a way to solve this problem other than simply setting the delay setting {hide}? The “correct” solution, in my opinion, would be to keep the “hidden setting” (aka, delay: {hide: 100}), but to allow the cursor to move, and not to start the timer on top of the popover.

Hope I missed a simple trick. Any and all help is appreciated.

+3
source share
3 answers

In the code below, a popover will be displayed when the mouse passes, and it will remain visible when the mouse leaves.

$("span[rel=popover]").popover({ trigger: 'manual' }).hover(function(e){ 
$(this).popover('show');
e.preventDefault(); 
});

To close the call,

 $("span[rel=popover]").popover('hide');

NTN

+7
source

It's probably a bit late in the game, but I just stumbled upon this popover option called "click over". The solution covers your needs and has several other useful methods.

http://www.leecarmichael.com/bootstrapx-clickover/examples.html

+6
source

, , stackoverflow popover live popover?

+1

All Articles