Giter Club home page Giter Club logo

cristiandavideconte / universalsmoothscroll Goto Github PK

View Code? Open in Web Editor NEW
55.0 1.0 6.0 434.48 MB

A cross-browser smooth-scrolling API which supports multiple and interruptable scroll-animations on all DOM's elements, even at the same time!

Home Page: https://cristiandavideconte.github.io/universalSmoothScroll/

License: MIT License

CSS 0.67% HTML 12.15% JavaScript 87.17%
smooth scroll browser cross-browser safari scroll-animations momentum-scrolling javascript ios

universalsmoothscroll's People

Contributors

cristiandavideconte avatar paragkatoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

universalsmoothscroll's Issues

Next.js (typescript) - How to import the USS API

Currently, I have added <script /> tag in the Document file.
Although ESLINT comments "USS is not declared" everything is still working now on LOCAL,
but my site is crashed on PRODUCT
Can you explain this bug?

Svelte (typescript) - How to import the USS API

Hello! This API looks really well done and I'm excited to use it. But first a dumb question. I seem to be missing something to make my app recognize the uss object.

Here are the steps I've taken, along with screenshots to clarify.

  1. Downloaded the uss package via npm install
  2. Copied the minified js file into my app's static directory
  3. Included the minified js file in a script tag in my app.html's header

The caveat here is that I'm using Svelte-kit, which uses server side rendering. Not sure if that is part of the equation or if I'm just missing something dumb.

-Directory structure-
image

-Script tag-
image

-uss object not recognized-
image

How to use setYStepLengthCalculator with hrefSetup?

Hello,

Most methods currently require a reference to a container to be called.
In my case I'm using the hrefSetup and not referencing any specific containers. Without a container reference, how can I appropriately utilize setYStepLengthCalculator or something similar so that it works with the hrefSetup method?

Thank you!

React.js/Next.js - hrefSetup stops anchor tags' click event propagation

Describe the bug
uss.hrefSetup prevents a element onClicks from firing.

To Reproduce
Steps to reproduce the behavior:

  1. Call uss.hrefSetup()
  2. Add an anchor tag with an onClick method.
<a
  onClick={() => {console.log("running")}}
  className="hover:text-[#F40F00]"
  href="#start"
>
  Home
</a>
  1. The passed onClick method will not run.

Expected behavior
The onClick method should run and the console should log "running"

Desktop:

  • OS: Windows
  • Browser Chrome
  • Version 105.0.5195.127 (Official Build) (64-bit)

Additional context
The onClick method will run if uss.hrefSetup() is not called.

React.js - How to import the USS API

How can I use this library in react application?
I tried to do so
import { uss } from 'universalsmoothscroll';
so
import uss from 'universalsmoothscroll';
but nothing comes out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.