如何将鼠标点击更改为鼠标悬停?

时间:2016-04-16 05:32:21

标签: jquery html css mouseover

以下是jsfiddle link,其中我获得了动画工具提示的代码,但问题是在click只有它们正在工作,我希望在我{{1}时生成动画鼠标就在它上面。

2 个答案:

答案 0 :(得分:3)

尝试添加此内容:

$('.popover-example a').hover(
  function(){
    $(this).click();
  }
);

https://jsfiddle.net/14Lz0f5z/

答案 1 :(得分:0)

JSFiddle

使用鼠标事件mouseentermouseleave

$('.popover-example li a').mouseenter(function() {
   $(this).trigger("click");
}).mouseleave(function() {
   $(this).trigger("click");
})
相关问题