Solution: #jQuery #bootstrap popover focus not working in Chrome
@admin
Updated November 15, 2013 ● 5,638 views
Updated November 15, 2013 ● 5,638 views
Programming
As I was developing this website, focus trigger for bootstrap popover doesn't work in Chrome. As a workaround, I used the following code below. You can see this in action by clicking on the user thumbnail below the title of this article.
As work around do the following using the default click trigger:
jQuery(function($) {
$(".pop-user-info").popover({placement:"top"});
jQuery("body").on("click",".pop-user-info",function(){
$(this).popover();
$(".pop-user-info").not(this).popover("hide"); //hide other popovers
return false;
});
jQuery("body").on("click",function(){
$(".pop-user-info").popover("hide"); //hide all popovers when clicked on body
});
});
2 Comments
Related
▶︎
More in Programming
▶︎
What is "pop-user-info"? Is this the class for each popovers? I don't have to use an Id?
David · 11 years agopermalink · reply (0)
It's working, but is there a way to just mkae it on hover. I'm trying to do hover but the popover disappears when mouse moves.
Prakash1 · 11 years agopermalink · reply (0)