Skip to content

Commit 25d8904

Browse files
committed
Merge branch 'master' of https://github.com/alexfoxy/laxx
2 parents 842b7d4 + 4657e7a commit 25d8904

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Alex Fox
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,12 @@ You can use these instead of integer values for the scrollPos e.g.
9292
</p>
9393
```
9494
95-
You can also do calculations using `( )` e.g.
95+
You can also use vanilla JS within `( )` for calculations and access to more variables e.g.
9696
```html
97-
<p data-lax-opacity="0 1, (vh*0.5) 0">
97+
<p data-lax-opacity="0 1, (document.body.scrollHeight*0.5) 0">
9898
I fade out as the page scrolls down and
99-
I'm gone when the page has scrolled half the view port height!
99+
I'm gone when the page has scrolled 50%
100+
down the entire page height!
100101
</p>
101102
```
102103
## Supported Presets

0 commit comments

Comments
 (0)