Laxicity is a jQuery plugin which allows to create parallax effect very easily.
Its basic use is the code below.
jQuery(".myParallax").laxicity();
It's important to specify data-laxicity="block" on each element containing parallax items.
Two parameters are optional: scrollSpy and offsetY
this site ;)
| Parameter | Type | Description |
| scrollSpy | string | This parameter specifies the scrollSpy selector. |
| offsetY | int | This parameter is the offset between the top of the window and the top of the container element to consider the perfect view. |
Example of a call with parameters:
jQuery(".myParallax").laxicity({
scrollSpy: '#scrollSPY',
offsetY: 100
});
You can specify the movement, the offset, and the velocity on each parallax element.
The offset is relative to the data-laxicity="block" ancestor.
| Attribute | Type | Description | Default |
| data-velocity | float | The speed relative to the scroll of the page ( 0 is default = no parallax). | 0 |
| data-direction | string | It can be : top, left, right, bottom | top |
| data-x | int | The horizontal offset | the default offset of the element |
| data-y | int | The vertical offset | the default offset of the element |
<section data-laxicity="block">
<p>
<img src="img/img.png" alt=""
class="myParallax"
data-velocity="0.5"
data-direction="top"
style="float: right" />
Lorem ipsum dolor sit amet
</p>
</section>
<script>
jQuery('.myParallax').laxicity();
</script>
jQuery laxicity is tested in Safari, Firefox 1.5+ , Internet Explorer 6+, Opera 9+ and Chrome.