1
  <div class="pop" style="display: none">
         'Dynamic content here'
    </div>
    <a href="#" class="opinionmap" rel="popover"><i class="icon-eye-open"></i></a>

$('.opinionmap').mouseenter(function() {
  $(this).popover({title: 'Current Opinion', trigger: 'hover', html: 'true', content: $(this).siblings('.pop').html(), placement: 'top'});
});

But the popover is working only after the second mouseenter event. I have viewed many related questions but none helped. Seeking answers!!!

4

2 回答 2

1

只用这个

$('.opinionmap').popover({
    title: 'Current Opinion', 
    trigger: 'hover', 
    html: 'true', 
    content: $('.opinionmap').siblings('.pop').html(),
    placement: 'top'
});
于 2013-09-05T11:30:03.887 回答
0

好的..所以将来任何人都会遇到同样的问题......这就是我解决它的方法。

  $('.opinionmap').mouseenter(function() {
    $(this).popover({title: 'Current Opinion', trigger: 'hover', html: 'true', content: $(this).siblings('.pop').html(), placement: 'top'}).popover('show');
    ;
  });
于 2013-09-05T12:06:05.327 回答