smooth-scroller

WebJar for smooth-scroller

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

smooth-scroller
Последняя версия

Последняя версия

2.2.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

smooth-scroller
WebJar for smooth-scroller
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/firstandthird/smooth-scroller

Скачать smooth-scroller

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/smooth-scroller/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>smooth-scroller</artifactId>
    <version>2.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/smooth-scroller/
implementation 'org.webjars.npm:smooth-scroller:2.2.1'
// https://jarcasting.com/artifacts/org.webjars.npm/smooth-scroller/
implementation ("org.webjars.npm:smooth-scroller:2.2.1")
'org.webjars.npm:smooth-scroller:jar:2.2.1'
<dependency org="org.webjars.npm" name="smooth-scroller" rev="2.2.1">
  <artifact name="smooth-scroller" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='smooth-scroller', version='2.2.1')
)
libraryDependencies += "org.webjars.npm" % "smooth-scroller" % "2.2.1"
[org.webjars.npm/smooth-scroller "2.2.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : domassist jar [2.2.0,3)

Модули Проекта

Данный проект не имеет модулей.

Smooth-scroller

npm

A tiny, ES6 JavaScript lib to handle smooth scrolling.

Installation

npm install smooth-scroller

Usage

See the full example.

Javascript

import 'smooth-scroller';

HTML

<a href="#foo" data-smooth>Scroll Smoothly</a>
...some content...
<div id="foo"></div>

Events

Custom events are fired on the element:

Event Description
smoothscroll:start Smooth scroll starts
smoothscroll:end Smooth scroll ends

Methods

Smooth-scroller exposes two methods:

init([selector='[data-smooth]'], [offset=0])

Enables smooth-scroller on the elements matched by selector.

Parameters

selector='[data-smooth]' - {String} - Elements that will trigger smooth-scroll call once they're clicked

offset=0 - {Number} - Controls the distance (negative or positive) between the top border of the element and the top border of the window.

scroll(target, hash, [offset=0], [silent=false])

target - {string|Element|NodeList} - Target element to scroll

hash - {string|Element|NodeList} - DOM element ID to scroll

offset=0 - {Number} - Controls the distance (negative or positive) between the top border of the element and the top border of the window.

silent=false - {Boolean} - If enabled, will generate a history.pushState event

org.webjars.npm

First+Third

We build things... awesome things.

Версии библиотеки

Версия
2.2.1