Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Preserve display height/width on menu slideUp

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #154482
    modiophile
    Participant

    How do I keep from losing display height/width when my sub-menu back slidesUp on mouse off?

    <script>
        $(document).ready(function(){
            $("nav ul.menu > li:first-of-type").hover(
                function(){
                    $('.sub-menu').slideDown('medium');}, 
                function(){
                    $('.sub-menu').slideUp('medium');}
            );
        });
    </script>
    

    http://cdpn.io/Jxbsj, make sure to hover over “SOLUTIONS” to see what I am talking about.

    #155247
    TheDoc
    Member

    You’ll need .sub-menu to be positioned absolutely.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.