jq-scrollto

Assigns a scrollTo method to jQuery.

Usage no npm install needed!

<script type="module">
  import jqScrollto from 'https://cdn.skypack.dev/jq-scrollto';
</script>

README

jq-scrollto

Assigns a scrollTo method to jQuery.

Usage

window.$ = window.jQuery = require('jquery')
require('jq-scrollto')

$.scrollTo('#target')

Functions

$.scrollTo(target, [time], [easing], [callbackFn])

Scroll to the target selector.

Param Type Default
target string
[time] number | function 1500
[easing] string | function 'easeInOutCubic'
[callbackFn] function