jQuery   发布时间:2022-03-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了jquery – 当mouseout时隐藏div大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我有两个div,一个用于简短摘要,一个用于长摘要.
当我在短摘要中“鼠标悬停”时,简短摘要消失并显示摘要.
当我从长摘要中“拖出”时它应该消失并且应该出现简短摘要.

问题是,当我仍然在长摘要的边界内但是在排序摘要的位置之外时,会发生R_13_11845@ouSEOut事件

码:

<head>
  <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.js"></script>
  <script>
      function show(Fdiv) {
          $(Fdiv).css("display","none");
          $(Fdiv).next().css("display","inline");
      }
      function hide(Sdiv) {
          $(Sdiv).css("display","none");
          $(Sdiv).prev().css("display","inline");
      }
  </script>

</head>
<body>
<div onmouSEOver="show(this)"> Sort sumMary <br /> Second Row</div>
<div onmouSEOut="hide(this)" style="display:none"> Long SumMary <br /> Second Row<br /> Third Row <br /> Fourth Row</div>
</body>
</html>

解决方法

试试这个

<div onmouSEOver="show_div(this)"> Sort sumMary <br /> Second Row</div>
<div onmouSEOut="hide_div(this)" style="display:none"> Long SumMary <br /> 
   Second Row<br /> Third Row <br /> Fourth Row</div>
<script>
    function show_div(Fdiv) {
      $(Fdiv).hide();
      $(Fdiv).next().show();
    }
    function hide_div(Sdiv) {
      $(Sdiv).hide();
      $(Sdiv).prev().show();
   }
 </script>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

大佬总结

以上是大佬教程为你收集整理的jquery – 当mouseout时隐藏div全部内容,希望文章能够帮你解决jquery – 当mouseout时隐藏div所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。