Code Monkey home page Code Monkey logo

jquery.smoothscrollwheel's Introduction

jquery.SmoothScrollWheel

Easy to get your website has smooth scroll wheel

Introduction

Tired to get your website become smooth when user scrolling? jquery.SmoothScrollWheel is a lightweight plugin help your website smooth scroll wheel across browers. View the demo here

How to use

Simple! Select your element need make it become smooth scroll and pass some simple settings

//Easy Mode
$(document).SmoothScrollWheel();

//More Options
$(document).SmoothScrollWheel({
        defaultSpeed: 60,
        defaultAnimationTime: 1200
    });

//Default Options
$(document).SmoothScrollWheel({
        debug: false,
        defaultDetailDelta: 3,
        defaultWheelDelta: 120,
        defaultSpeed: 50,
        defaultAnimationTime: 1500
    });
  • debug: (default false) Write out console log current scroll top position of the element.

  • defaultDetailDelta: (default 3) Normalize scroll speed across browsers. You shouldn't change it.

  • defaultWheelDelta: (default 120) Normalize scroll speed across browsers. You shouldn't change it.

  • defaultSpeed: (default 50) Scroll top per mousewheel. Change it if you think the scroll speed is low or too fast.

  • defaultAnimationTime:(default 1500) Time to make scroll wheel complete the animation. Change it if you think the scroll speed is low or too fast.

Notes

This plugin also can make sections, popups have overflow-y smooth when user scrolling.

However if your website have popups or sections have overflow-y and you have already implement $(document) smooth scrolling, but not target these popups or sections, these popus or sections can't scroll down.

// Once you implement $(document) smooth scrolling, you must also target these, or it won't scroll!
$("#popup").SmoothScrollWheel();
$("#div-has-overflow").SmoothScrollWheel();


$(document).SmoothScrollWheel();

Contact me via [email protected]

jquery.smoothscrollwheel's People

Contributors

nntgwww avatar

Stargazers

Fabio Pinto avatar  avatar Roger Luiz avatar astrit avatar Chinh Nguyen avatar  avatar

Watchers

 avatar

Forkers

alfn7511

jquery.smoothscrollwheel's Issues

MacOs trackpad scroll

Hi,
It's a problem on Mac OS when scrolling with the trackpad or magic mouse, the scroll is not smooth. But if you scroll with simple mouse everything works perfectly. Is there any solution to this? Thx.

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.