0.4.0 • Published 2 years ago

@internetguru/scrolltopable v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

GitHub Workflow Status GitHub npm GitHub file size in bytes

Scrolltopable

Scrolltopable is a JavaScript module that provides ultimate scroll-to-top functionality. No dependencies and frameworks, pure JavaScript!

See our demo.

Simple Usage

<head>
  <!-- include basic css -->
  <link rel="stylesheet" type="text/css" href="https://unpkg.com/@internetguru/scrolltopable@latest/basic.css"/>
  <!-- include scrolltopable -->
  <script type="module" src="https://unpkg.com/@internetguru/scrolltopable@latest/index.min.js"></script>
  <!-- initialization with modifying default options -->
  <script type="module">
    import { Scrolltopable } from './index.min.js'
    Scrolltopable.init({
      text: '⌃',
      hideTop: 0,
    })
  </script>
</head>

Note: you can install package locally by running npm i @internetguru/scrolltopable --save.

Options

Configuration nameDefault valueDescription
Config.text^Text or HTML to be inserted into main element
Config.titleTopButton title
Config.hideTop500Position in px from the top of the page where button will be hidden
Config.showBottom500Position in from the bottom of the page where button will be shown
Config.deltaUpShow200Scroll up delta in px which show button
Config.deltaDownHide200Scroll down delta in px which hide button
Config.activeTimeout0For how long time in ms button should have activeClass and be visible after click on button
Config.scrollActionTimeout200For how long should be processing scroll delayed after stop scrolling
Config.nsjs-scrolltopableButton id and prefix for classes
Config.extraClassnoprintButton extra class(es)
Config.visibleClass${Config.ns}--visibleClass for visible button
Config.activeClass${Config.ns}--activeClass for active button (activeTimeout > 0)

Maintainers

  • Paulo Petrzela paulo@internetguru.io
  • George Pavelka george@internetguru.io

Contributing

Pull requests are welcome, don't hesitate to contribute.

Donation

If you find this program useful, please send a donation to its developers to support their work. If you use this program at your workplace, please suggest that the company make a donation. We appreciate contributions of any size. Donations enable us to spend more time working on this package, and help cover our infrastructure expenses.

If you’d like to make a donation of any value, please send it to the following PayPal address:

PayPal Donation

Since we aren’t a tax-exempt organization, we can’t offer you a tax deduction. But for all donations over 50 USD, we’d be happy to recognize your contribution on this README file for the next release.

We are also happy to consider making particular improvements or changes, or giving specific technical assistance, in return for a substantial donation over 100 USD. If you would like to discuss this possibility, write us at info@internetguru.io.

Another possibility is to pay a software maintenance fee. Again, write us about this at info@internetguru.io to discuss how much you want to pay and how much maintenance we can offer in return.

Thanks for your support!

License

MIT License

0.4.0

2 years ago

0.3.0

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago