Message from JavaScript discussions

June 2017

— Help. How to Make menu show if page scroll down and hide if page scroll up again

— 

Https://www.google.it/search?q=How+to+Make+menu+show+if+page+scroll+down+and+hide+if+page+scroll+up+again&oq=How+to+Make+menu+show+if+page+scroll+down+and+hide+if+page+scroll+up+again&aqs=chrome..69i57.565j0j1&sourceid=chrome&ie=UTF-8

— S :

var lastScrollTop = 0; // element should be replaced with the actual target element on which you have applied scroll, use window in case of no target element. element.addEventListener("scroll", function(){ // or window.addEventListener("scroll".... var st = window.pageYOffset || document.documentElement.scrollTop; // Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426" if (st > lastScrollTop){ // downscroll code } else { // upscroll code } lastScrollTop = st; }, false);

Message permanent page

— Https://stackoverflow.com/questions/31223341/javascript-detecting-scroll-direction

— You don't need this...

— This will be useful if you want to implement something like fullpage.js

— Oh ok

— Farhaan Bukhsh:
https://farhaanbukhsh.wordpress.com/2017/06/06/design-pattern-singleton/

— Use code tags instead of images man

— They distort the indentation plus they don't look pretty 😂😂🙈

— The images are warped

— Not getting you !