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

        <bdo id='KmIQs'></bdo><ul id='KmIQs'></ul>

      <legend id='KmIQs'><style id='KmIQs'><dir id='KmIQs'><q id='KmIQs'></q></dir></style></legend>
    1. <small id='KmIQs'></small><noframes id='KmIQs'>

      JQuery .slideDown() 向上滑动

      JQuery .slideDown() is sliding up(JQuery .slideDown() 向上滑动)

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

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

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

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

                本文介绍了JQuery .slideDown() 向上滑动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                This works but I'm not sure why. In function capIn(), in my mind the line $botcap.slideDown("slow") should slide the div down. It slides it up. If I try using .slideUp() nothing happens as if it is trying to slide it down. Can anyone explain this to me?

                $(".slide").hover(capIn, capOut);
                
                function capIn(){
                    //slide top caption down
                    var $topcap = $(this).children(".topcap");
                    $topcap.slideDown("slow");
                
                    //slide bottom caption up
                    //!! Why does slideDown slide caption up here?
                    var $botcap = $(this).children(".botcap");
                    $botcap.slideDown("slow")
                }
                
                function capOut(){
                    //slide top back up
                    var $topcap = $(this).children(".topcap");
                    $topcap.slideUp("slow");
                
                    //slide bottom back down
                    var $botcap = $(this).children(".botcap");
                    $botcap.slideUp("slow");
                }
                

                解决方案

                jQuery's slideDown and slideUp functions are actually misnomers. As the documentation for slideUp puts it:

                Hide the matched elements with a sliding motion.

                The hiding is achieved by modifying the height of the element; normally, this means that the lower edge of the element appears to slide up, hence the name. However, if the element is anchored at the bottom (e.g. by setting position: absolute and bottom: 0), the height modification will make the top edge appear to slide down.

                这篇关于JQuery .slideDown() 向上滑动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                Move link image 5px up on hover(悬停时将链接图像向上移动 5px)
                How do I inspect CSS pseudo classes with firebug?(如何使用 firebug 检查 CSS 伪类?)
                Why doesn#39;t CSS hover work on table rows when the cells inside the rows have class names?(当行内的单元格具有类名时,为什么 CSS 悬停在表格行上不起作用?)
                Hover image - display div over it(悬停图像 - 在其上显示 div)
                How to apply a CSS class on hover to dynamically generated submit buttons?(如何在悬停时将 CSS 类应用于动态生成的提交按钮?)
                Differences between CSS3 :hover and :focus?(CSS3 :hover 和 :focus 的区别?)

                    1. <small id='eZDQ8'></small><noframes id='eZDQ8'>

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