Conditionally load Javascript based on media query

  @media all and (max-width: 900px) would be…

 

Smooth Page Scroll to Div on Same Page

Using hash tags to reference different parts of a page? Use this snippet to make the scroll to page smooth and to remove the hash tag that automatically gets appended to the url in the browser window.