Giter Site home page Giter Site logo

corentinfardeau / horizontal-scroll Goto Github PK

View Code? Open in Web Editor NEW
233.0 233.0 48.0 1.43 MB

Horizontal scroll with inertia

Home Page: https://corentinfardeau.github.io/horizontal-scroll/

License: MIT License

JavaScript 100.00%
horizontal inertia inertia-scroll scroll scrolling smooth

horizontal-scroll's People

Contributors

corentinfardeau avatar kevinboudot 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  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  avatar  avatar  avatar  avatar  avatar

horizontal-scroll's Issues

Link to #anchor

I'm using the class="block" with width: 100vw; and height: 100vh; as to create various sections in a horizontal layout, however, a simple menu, with links to the various sections doesn't work properly. Particularly when it comes to the first section, but also on the others, it only scrolls halfway into it, not to its beginning. Other times don't work at all.
My set up goes like this:
JSFIDDLE

Animate manually

I am trying to add next/prev buttons, create a dots navigation but I am not able to animate the .horizontal-scroll div.

I tried many ways:

TweenMax.to('.horizontal-scroll', 1, { x: -500 });
$('.horizontal-scroll').css({ transform: 'translate3d(-1000px, 0 ,0)' });

Nothing worked. How can I jump to a specific block or even animate the animate .horizontal-scroll div manually?

Plugin init appears to init correctly, but scroll/transform doesn't occur.

Hi, first of all the demo for this looks great.

I've been trying to implement a test case based on the demo, but am having some trouble. The plugin appears to init correctly, but the scrolling div doesn't transform. I can scroll horizontally across the trackpad, but it doesn't hijack the vertical scroll as expected โ€” any idea why this could be happening? Unfortunately, the console isn't throwing any errors.

I'm happy to post code as required. My test case is using hugo.

HS with percentage blocks

Thanks for the good work!
I actually would like to use horizontal-scroll with full height (100vh) and % width blocks (1/3 width), so the screen is exactly filled with 3 blocks. Only when scrolling, the other blocks would be visible.
Right now it's only possible to use horizontal-scroll with px width blocks, which doesn't provide the look i'm looking for.
Is there a way to use horizontal-scroll with percentage blocks?
Thanks!

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.