-
so
So.js: A multipurpose JavaScript library (DOM, HTTP, Events, Animations and extensions built with So). (by krmgns)
-
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.
// 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);