<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() 向上滑动

      时间:2023-11-29

        <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() 向上滑动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:Javascript“悬停时"环形 下一篇:有什么方法可以阻止 CSS :hover text-decoration underline on child?

                相关文章

                  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>
                  2. <legend id='eZDQ8'><style id='eZDQ8'><dir id='eZDQ8'><q id='eZDQ8'></q></dir></style></legend>