Lightweight way of detecting scroll direction

This page summarizes the projects mentioned and recommended in the original post on /r/learnjavascript

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • so

    So.js: A multipurpose JavaScript library (DOM, HTTP, Events, Animations and extensions built with So). (by krmgns)

  • // https://github.com/qeremy/so/blob/master/so.dom.js#L426 let prevScrollTop = window.pageYOffset || document.documentElement.scrollTop; let prevScrollDirection = ''; window.addEventListener('scroll', function() { const st = window.pageYOffset || document.documentElement.scrollTop; if (st > prevScrollTop && prevScrollDirection !== 'down') { // downscroll code here prevScrollDirection = 'down'; } else if (st < prevScrollTop && prevScrollDirection !== 'up') { // upscroll code prevScrollDirection = 'up'; } prevScrollTop = st <= 0 ? 0 : st; // for Mobile or negative scrolling }, false);

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Svelte Series-2: How to install Svelte

    10 projects | dev.to | 20 May 2024
  • A low code end to end API testing tool powered by LLMs

    1 project | news.ycombinator.com | 20 May 2024
  • Make Timelapse easily using FFmpeg

    5 projects | news.ycombinator.com | 19 May 2024
  • Ask HN: Which browser add-on for Hacker News do you use?

    1 project | news.ycombinator.com | 20 May 2024
  • Calling code with local LLM is a hoax

    1 project | dev.to | 20 May 2024