I'm trying to create fixed-top menu, and resize them (by changing padding top&bottom) when window scrolled down > 300px for example.
If i try that after 300px from top, set css style like $('nav').css('padding', '30px 0 30px 0');
all work fine, but if i try to do this with animation, i get huge latency between events.
There is example: Without animate - http://jsfiddle.net/g3xLgLeb/1/ (all work fine)
With animate - http://jsfiddle.net/g3xLgLeb/ (huge latency)