Need help with simplr-smoothscroll?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

simov
210 Stars 101 Forks MIT License 29 Commits 15 Opened issues

Description

Smooth scrolling in all browsers

Services available

!
?

Need anything else?

Contributors list

# 3,874
JavaScr...
aws-lam...
js
lambda
21 commits
# 356,175
JavaScr...
HTML
amazon
Webpack
2 commits
# 560,945
HTML
JavaScr...
1 commit

simplr-smoothscroll

DEMO

Requirements

jquery-mousewheel

Usage

$(function () {
  $.srSmoothscroll({
    // defaults
    step: 55,
    speed: 400,
    ease: 'swing',
    target: $('body'),
    container: $(window)
  })
})

Enable scrolling for specific widgets

See this example

lorem ipsum

lorem ipsum

#container1 { width: 500px; height: 300px; overflow: auto; }
#container2 { width: 500px; height: 300px; overflow: auto; }
$(function () {
  $.srSmoothscroll({
    target: $('#widget1'),
    container: $('#container1')
  })
  $.srSmoothscroll({
    target: $('#widget2'),
    container: $('#container2')
  })
})

Browser and os detection

Browsers that support smooth scrolling natively may be excluded.

$(function () {
  var platform = navigator.platform.toLowerCase();
  if (platform.indexOf('win') == 0 || platform.indexOf('linux') == 0) {
    if ($.browser.webkit) {
      $.srSmoothscroll();
    }
  }
});

This will enable simplr-smoothscroll only for webkit browsers on windows and linux.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.