Jquery: Using scrollTop to make animated sticky menu
问题 I'm trying to create an animated sticky menu. User loads up the page and the navigation is stationary. User then scrolls down the page and after like 500 pixels (scrolling over the original navigation), the navigation animates into the page stuck to the top using fixed positioning. I have it working now (see codepen: http://codepen.io/chrisyerkes/pen/uoFKl) however, once I scroll back up and it resets the menu's position, the next time I scroll down the page, it no longer animates in, just