jquery-aniview

WebJar for jquery-aniview

Лицензия

Лицензия

MIT
Категории

Категории

Github Инструменты разработки Контроль версий
Группа

Группа

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

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

github-com-jjcosgrove-jquery-aniview
Последняя версия

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

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

jquery-aniview
WebJar for jquery-aniview
Ссылка на сайт

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

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

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

https://github.com/jjcosgrove/jquery-aniview

Скачать github-com-jjcosgrove-jquery-aniview

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

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

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

jQuery AniView

A jQuery plugin that works in harmony with animate.css in order to enable animations only when content comes into view.

Demo

http://jjcosgrove.github.io/jquery-aniview/

Installation (via npm)

npm install jquery-aniview

CDN

Instead of a local installation you may request a remote copy of jQuery AniView from unpkg CDN.

To request the latest version, use the following:

<script src="https://unpkg.com/jquery-aniview/dist/jquery.aniview.js"></script>

For maximum security you may also decide to:

Example:

<script src="https://unpkg.com/jquery-aniview@1.0.1/dist/jquery.aniview.js"
integrity="sha384-zDA6q/t525x7f6KD/OaOe24vCxSPU3eraILc2NU+ZA7ISsc3ExQbj8PB56FRMq6H"
crossorigin="anonymous"></script>

Initialisation

$('.aniview').AniView();

Options

var options = {
    animateThreshold: 100,
    scrollPollInterval: 50
}
$('.aniview').AniView(options);
Option Type Description Default
animateThreshold int +ve numbers delay the animation sequence until the specified number of pixels have come into view. -ve numbers will trigger the animation sequence prior to the element coming into view. 0
scrollPollInterval int The frequency at which user scrolling is 'polled' i.e. tested. This is in milliseconds (ms) and is an extension to jQuery's in-built 'scroll' event/handler. 20

Markup

<div class="aniview" data-av-animation="slideInRight"></div>

Full Example

A typical working example (minimal) might look something like this:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>My AniView Page</title>
    <link type="text/css" rel="stylesheet" href="animate.css">
    <script type="text/javascript" src="jquery.min.js"></script>
    <script type="text/javascript" src="jquery.aniview.js"></script>
    <script>
        $(document).ready(function(){
            $('.aniview').AniView();
        });
    </script>
</head>
<body>
    <div>
        <p class="aniview" data-av-animation="slideInRight">
            This is my awesome animated element!
        </p>
    </div>
</body>
</html>

Notes

Any element already in the viewport when the user loads the page will have it's animation triggered immediately if one has been set. In other words, it will not wait for the user to begin scrolling before initiating the animation on these elements.

Contribute

Bugs or feature requests/contributions can be done via:

https://github.com/jjcosgrove/jquery-aniview/issues

Authors

  • Just me for now.

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

Версия
1.0.2