Forums

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

Home Forums JavaScript Javascript Show Hide Position

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #201058

    Hi..
    I have some problem in CSS/ Javascript

    I use javascript to toggle show my mobile menu , and it display not from top but from left

    You can see my website here link.

    here the code
    $(document).ready(function(){
    $("#menubtmafrian").click(function(){
    $("#mobilemenu").toggle('slow') ;
    });
    });

    and CSS

    <code class="css">#mobilemenu {
        width:100%;
        background-color:#E8E8E8;
        opacity:1;
        height:100%;
        top:10px;
        padding-bottom:10px;
        z-index:981;
        display:none;
        padding-top:50px;
        position:relative;
        overflow:hidden;
        box-shadow:1px 1px 5px #000;
        background-image:url(../img/itdotted.png);
    }
    
    

    thank’s

    #201061
    Paulie_D
    Member

    Until we see a demo it’s hard to tell.

    So, a Codepen.io demo is really needed.

    #201073
    #201074
    Paulie_D
    Member

    The .toggle() method animates the width, height, and opacity of the matched elements simultaneously.

    http://api.jquery.com/toggle/

    Basically, the width & height are animating.

    You might be better adding or removing classes to get this to display.

    #201084
    Paulie_D
    Member

    Perhaps slideToggle is what you wanted

    http://codepen.io/Paulie-D/pen/eNmJJK

    #201117

    oh that’s what I mean , thank’s for your answer !

    #201118
    Alen
    Participant
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.