<i id='P9nSZ'><tr id='P9nSZ'><dt id='P9nSZ'><q id='P9nSZ'><span id='P9nSZ'><b id='P9nSZ'><form id='P9nSZ'><ins id='P9nSZ'></ins><ul id='P9nSZ'></ul><sub id='P9nSZ'></sub></form><legend id='P9nSZ'></legend><bdo id='P9nSZ'><pre id='P9nSZ'><center id='P9nSZ'></center></pre></bdo></b><th id='P9nSZ'></th></span></q></dt></tr></i><div id='P9nSZ'><tfoot id='P9nSZ'></tfoot><dl id='P9nSZ'><fieldset id='P9nSZ'></fieldset></dl></div>
  • <legend id='P9nSZ'><style id='P9nSZ'><dir id='P9nSZ'><q id='P9nSZ'></q></dir></style></legend>
  • <small id='P9nSZ'></small><noframes id='P9nSZ'>

    1. <tfoot id='P9nSZ'></tfoot>
        <bdo id='P9nSZ'></bdo><ul id='P9nSZ'></ul>

        悬停时的Jquery不起作用

        Jquery on hover not functioning(悬停时的Jquery不起作用)
          <bdo id='Izooi'></bdo><ul id='Izooi'></ul>

          <i id='Izooi'><tr id='Izooi'><dt id='Izooi'><q id='Izooi'><span id='Izooi'><b id='Izooi'><form id='Izooi'><ins id='Izooi'></ins><ul id='Izooi'></ul><sub id='Izooi'></sub></form><legend id='Izooi'></legend><bdo id='Izooi'><pre id='Izooi'><center id='Izooi'></center></pre></bdo></b><th id='Izooi'></th></span></q></dt></tr></i><div id='Izooi'><tfoot id='Izooi'></tfoot><dl id='Izooi'><fieldset id='Izooi'></fieldset></dl></div>
          <legend id='Izooi'><style id='Izooi'><dir id='Izooi'><q id='Izooi'></q></dir></style></legend>

          <small id='Izooi'></small><noframes id='Izooi'>

              <tbody id='Izooi'></tbody>
              <tfoot id='Izooi'></tfoot>

                • 本文介绍了悬停时的Jquery不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在更改我的代码以与 jQuery 1.8 兼容,但我被这个不起作用的 hover 所困扰.当我将同样的东西与 click 一起使用时,它起作用了.这是我的代码,谁能告诉我哪里出错了?

                  I'm changing my codes to be compatible with jQuery 1.8 and I'm stuck with this hover which doesn't work. When I used then same thing with a click it worked. Here is my code, can anyone tell me where I'm going wrong?

                  $(document).on('hover', '.top-level', function (event) {
                    $(this).find('.actionfcnt').show();
                    $(this).find('.dropfcnt').show();
                  }, function () {
                    $(this).find('.dropfcnt').hide('blind', function () {
                      $('.actionfcnt').hide();
                    });
                  });
                  

                  推荐答案

                  自 jQuery 1.8 起已弃用:名称hover"用作字符串mouseenter mouseleave"的简写.它为这两个事件附加了一个事件处理程序,处理程序必须检查 event.type 以确定事件是 mouseenter 还是 mouseleave.不要混淆悬停"伪事件名称和 .hover() 方法,后者接受一两个函数.

                  Deprecated as of jQuery 1.8: The name "hover" used as a shorthand for the string "mouseenter mouseleave". It attaches a single event handler for those two events, and the handler must examine event.type to determine whether the event is mouseenter or mouseleave. Do not confuse the "hover" pseudo-event-name with the .hover() method, which accepts one or two functions.

                  来源:http://api.jquery.com/on/#additional-notes

                  这几乎说明了一切,你不能使用悬停":

                  That pretty much says it all, you cant use "hover" for that:

                  $(document).on('mouseenter','.top-level', function (event) {
                      $( this ).find('.actionfcnt').show();
                      $( this ).find('.dropfcnt').show();
                  }).on('mouseleave','.top-level',  function(){
                      $( this ).find('.dropfcnt').hide('blind', function(){
                          $('.actionfcnt').hide();
                      });
                  });
                  

                  这篇关于悬停时的Jquery不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  在开发JS过程中,会经常遇到两个小数相运算的情况,但是运算结果却与预期不同,调试一下发现计算结果竟然有那么长一串尾巴。如下图所示: 产生原因: JavaScript对小数运算会先转成二进制,运算完毕再转回十进制,过程中会有丢失,不过不是所有的小数间运算会
                  append() 方法在被选元素的结尾(仍然在内部)插入指定内容。 语法: $(selector).append( content ) var creatPrintList = function(data){ var innerHtml = ""; for(var i =0;i data.length;i++){ innerHtml +="li class='contentLi'"; innerHtml +="a href
                  问题描述: 在javascript中引用js代码,然后导致反斜杠丢失,发现字符串中的所有\信息丢失。比如在js中引用input type=text onkeyup=value=value.replace(/[^\d]/g,) ,结果导致正则表达式中的\丢失。 问题原因: 该字符串含有\,javascript对字符串进行了转
                  Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                  quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                  CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
                  <tfoot id='MMgt1'></tfoot>
                      1. <i id='MMgt1'><tr id='MMgt1'><dt id='MMgt1'><q id='MMgt1'><span id='MMgt1'><b id='MMgt1'><form id='MMgt1'><ins id='MMgt1'></ins><ul id='MMgt1'></ul><sub id='MMgt1'></sub></form><legend id='MMgt1'></legend><bdo id='MMgt1'><pre id='MMgt1'><center id='MMgt1'></center></pre></bdo></b><th id='MMgt1'></th></span></q></dt></tr></i><div id='MMgt1'><tfoot id='MMgt1'></tfoot><dl id='MMgt1'><fieldset id='MMgt1'></fieldset></dl></div>
                          <bdo id='MMgt1'></bdo><ul id='MMgt1'></ul>
                            <tbody id='MMgt1'></tbody>

                            <small id='MMgt1'></small><noframes id='MMgt1'>

                          1. <legend id='MMgt1'><style id='MMgt1'><dir id='MMgt1'><q id='MMgt1'></q></dir></style></legend>