Provides integration scrollUp library as a jQuery plugin to smoothly scroll to top page.

jQuery ScrollUp is a JavaScript Library and original JS library development credits stay with Mark Goodyear

Module comparison

The motivation under this module at the time it was written was the lack of proper working D9 modules filling my needs. Here is an opinionated comparison with similar solutions.

  1. Back to Top module : requires jQuery UI to work. Because this library is considered deprecated, Drupal 9 moves away from it and it is not included in core anymore. Therefore, this module requires jQuery UI module for D9 and rely on an old library and external contrib module.
  2. ScrollUp module : is less configurable and uses its own custom JS to provide the solution. Based on scroll jquery event, I experienced performance issues using it.
  3. Advanced Scroll Top module : is based on the very same solution as this module. The main differences are that it is not configurable via UI (only code) and it embed it's library so it is not possible to handle it via composer, npm or other solution.

Drupal 8/9 indications:

Case : Install and manage dependencies via composer

1. Install the module itself :
composer require drupal/jquery_scrollup

2. Install wikimedia/composer-merge-plugin :
composer require wikimedia/composer-merge-plugin

3. Edit your "merge-plugin" section under "extra" in your *root* composer.json so it looks like:

  "extra": {
    "merge-plugin": {
      "include": [
        "modules/contrib/jquery_scrollup/composer.libraries.json"
      ],

Beware to change the path to your contrib module folder if under web or docroot for instance

4. Run a locked update:
composer update --lock

Case: Install and manage dependencies the old way

1. Download and unzip typedjs module from https://www.drupal.org/project/jquery_scrollup
and place it into /modules/contrib folder.

2. Download and unzip typedjs from https://github.com/markgoodyear/scrollup
and place it into /libraries folder so the following path exists
/libraries/scrollup/dist/jquery.scrollUp.min.js

Configuration:

1. Move to /admin/config/user-interface/jquery_scrollup.
2. Edit the configurations as per desired.
4. Save.

Supporting organizations: 

Project information

Releases