【问题标题】:How to change mouse click to mouse hover?如何将鼠标单击更改为鼠标悬停?
【发布时间】:2016-08-08 05:09:18
【问题描述】:

这是jsfiddle link,我在其中获得了动画工具提示的代码,但问题是click 只有它们在工作,我希望当我hover 鼠标在它上面时它是动画的。

【问题讨论】:

    标签: jquery html css mouseover


    【解决方案1】:

    尝试添加这个:

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

    https://jsfiddle.net/14Lz0f5z/

    【讨论】:

      【解决方案2】:

      JSFiddle.

      使用鼠标事件mouseentermouseleave

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2013-05-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多