Forums

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

Home Forums CSS Need help with mobile navigation effect Reply To: Need help with mobile navigation effect

#265123
Beverleyh
Participant

The approach I’d take (which is probably what you’ll find a lot of when you research similar menus/tutorials online) is;
– toggle the addition or removal of a class with JS
– define a slide transition via the class with CSS

You can’t transition between display:none; and other values in CSS, but I’m not sure how jQuery handles things with its horizontal reveal methods. From memory, it’s vertical slideDown method does it by calculating lots of incremental inline styles to change the height on the fly, so I image that the horizontal slide animations do something similar with width.