Search code examples
jquerytwitter-bootstrappopoverjquery-hover

Bootstrap popover does not work on first mouseenter event


I use the code as follows

<a class="reply"  data-content="this is the mail" 
data-original-title="this is the title" rel="popover">this</a>

and I triggered the jquery event as follows

$(document).on("mouseenter",".reply",function(event){
   $(this).popover({placement:'bottom'});
});

But the problem is on the first hover event the popover not get showed

from the second event popover get showed normally... What is the reason for this kind of activity and how to rectify it...


Solution

  • I found the answer adding the following code made it work

    $(document).on("mouseenter",".reply",function(event){
      $(this).popover({placement:'bottom'});
      $(this).popover('toggle');
    });