- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Javascript Show Hide Position
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
Until we see a demo it’s hard to tell.
So, a Codepen.io demo is really needed.
The .toggle() method animates the width, height, and opacity of the matched elements simultaneously.
Basically, the width & height are animating.
You might be better adding or removing classes to get this to display.
Perhaps slideToggle
is what you wanted
oh that’s what I mean , thank’s for your answer !
Hey @afrianhasendra check out this as well https://bradfrost.github.io/this-is-responsive/patterns.html#navigation