jQuery Parallax Scrolling Plugin paroller.js 1.44

Add-ons
2026-07-25 22:53 2 次浏览 • 0 次下载 10.7KB
jQuery Parallax Scrolling Plugin paroller.js 1.44

Release Date: 2019-1-17 22:51

paroller.js1.44

  • A lightweight jQuery plugin that creates parallax scrolling effects.

  • You can use it with elements that have background properties or any other elements.

  • Scrolling elements can move vertically or horizontally.

  • Controlled through HTML data-* attributes or jQuery options.

  • Mobile-ready

  • Easy to Use

Usage

Initialize paroller.js

1
$('.my-paroller').paroller();

Initialize paroller.js and set attributes

1
$(".my-element").paroller({ factor: 0.5, factorXs: 0.2, factorSm: 0.3, type: 'foreground', direction: 'horizontal' });

Select elements and set attributes

1
2
3
4
5
6
7
<div class="my-paroller"
data-paroller-factor="0.4"
data-paroller-factor-xs="0.2"
data-paroller-factor-sm="0.3"
data-paroller-type="foreground"
data-paroller-direction="horizontal"
>

Select elements

1
<div class="my-element"></div>

Options

Data Attributes

You can control parallax effects through data-paroller-* attributes or jQuery values.

data-paroller-*jQueryvaluedefault value
data-paroller-factorfactornumber (+/-)0
data-paroller-factor-xsfactorXsnumber (+/-)0
data-paroller-factor-smfactorSmnumber (+/-)0
data-paroller-factor-mdfactorMdnumber (+/-)0
data-paroller-factor-lgfactorLgnumber (+/-)0
data-paroller-typetypebackground, foregroundbackground
data-paroller-directiondirectionvertical, horizontalvertical

data-paroller-factor

Set the speed and distance of an element's parallax effect while scrolling. Values can be positive (0.3) or negative (-0.3). Smaller values mean slower movement. Different signs (+/-) indicate different directions (up/down, left/right).

data-paroller-factor-*

Set the parameter multiplier for the selected breakpoint.


data-paroller-factor-*jQuery optionwindow width breakpoint
Extra smalldata-paroller-factor-xsfactorXs<576px
Smalldata-paroller-factor-smfactorSm<=768px
Mediumdata-paroller-factor-mdfactorMd<=1024px
Largedata-paroller-factor-lgfactorLg<=1200px
Extra Largedata-paroller-factor-xlfactorxl<=1920px

JavaScript

1
2
3
4
5
6
7
// Initialize paroller.js and set attributes for the selected elements
$(".paroller, [data-paroller-factor]").paroller({
factor: 0.2, // Multipliers for scroll speed and offset; values control the +/- direction
factorLg: 0.4, // Multipliers for scroll speed and offset when the window width is less than 1200px; values control the +/- direction
type: 'foreground', // background, foreground
direction: 'horizontal' // vertical, horizontal
});

Set factor breakpoints

1
2
3
4
5
6
7
8
9
10
11
// Initialize paroller.js and set attributes for the selected elements
$(".paroller, [data-paroller-factor]").paroller({
factor: 0.3, // +/-, select this value if no other breakpoint factor is configured
factorXs: 0.1, // factorXs, factorSm, factorMd, factorLg, factorXl
factorSm: 0.2, // factorXs, factorSm, factorMd, factorLg, factorXl
factorMd: 0.3, // factorXs, factorSm, factorMd, factorLg, factorXl
factorLg: 0.4, // factorXs, factorSm, factorMd, factorLg, factorXl
factorXl: 0.5 // factorXs, factorSm, factorMd, factorLg, factorXl
type: 'foreground', // background, foreground
direction: 'horizontal' // vertical, horizontal
});
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare