I am relatively new to CSS3 and I have to do this, so please forgive the awful code. All I'm trying to do is make a canvas menu with accordion navigation (in fact, I want it to be horizontal navigation for the desktop, off-canvas for mobile devices, but this is another story ...). https://jsfiddle.net/StephanieQ/uk0902qx/1/
I use the jQuery slideUp / Down method to achieve these effects, but there are simply no transitions. If I specify the time as an argument to the function, the animation just fluctuates during this duration.
$(document).ready(function(){
$("nav h3").click(function(){
$("nav ul ul").slideUp();
if(!$(this).next().is(":visible"))
{
$(this).next().slideDown();
}
});
});
I'm sure the reason is obvious, but I really don't see it. And I would also prefer to use toggleClass or something similar so that it matches my media queries. Any help would be great!
(The ugly red frame is a logo - Bonus question: why does the image just appear, and not pass, like everything else?)
source
share