New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

roll.js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roll.js

Simple scroll to top function. No dependencies.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

roll.js

Simple scroll to top function. No dependencies.

Install

You can get it on npm.

npm install roll.js

Or using yarn.

yarn add roll.js

Setup

You can import it using ES6 Modules.

import roll from 'roll.js'

Or using CommonJS.

const roll = require('roll.js')

If you are not using a bundler, just include the script located in the dist folder.

<script src="dist/roll.min.js"></script>

Usage

Now, all you need to do is call the roll function into your desired event.

const button = document.querySelector('button')

button.addEventListener('click', () => {
  roll()
})

Contributing

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -m 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request :D

License

MIT License © Iago Dahlem

Keywords

browser

FAQs

Package last updated on 15 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts