Forums

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

Home Forums JavaScript [Solved] Issue with jQuery slideToggle 'display: none' Re: Issue with jQuery slideToggle ‘display: none’

#129493
Podders
Participant

@Rugg The sliding animation can be achieved with CSS3 transitions, it’s actually better to do any animation for small screens using CSS3, Paul Irish did a fantastic explanation to why over at his blog,

http://paulirish.com/2012/why-moving-elements-with-translate-is-better-than-posabs-topleft/

Adding the callback for toggleClass would do nothing because the existing slideToggle function was still in place, so the same inline styles to perform the animation then hide the nav are still there,

I forked your fiddle to add CSS3 transitions

http://jsfiddle.net/2HSU2/1/embedded/result/