Skip to content

Commit 4d35cc5

Browse files
committed
updated readme
1 parent d4521bc commit 4d35cc5

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,17 @@ $("#selector").parallax({
3838
});
3939
```
4040

41-
### Supported properties:
41+
### Properties
4242

43-
Property value can be specified as number or percentage (string) or object.
43+
All properties can be specified as **number** or **percentage** (string) or **object**.
4444
To specify a **from** value as well **to**, use the object syntax:
4545

4646
```html
47-
<div data-parallax='{"opacity":{"to":1,"from":0}'></div>
47+
<div data-parallax='{"opacity":{"to":1,"from":0}}'></div>
4848
```
4949

50+
### Available properties:
51+
5052
translateX
5153

5254
translateY
@@ -59,9 +61,21 @@ rotate
5961

6062
opacity
6163

62-
### Available options:
64+
### Options
65+
66+
Options can be specified for all properties:
67+
68+
```html
69+
<div data-parallax='{"opacity":{"to":1,"from":0},"duration":"100%"}'></div>
70+
```
6371

64-
Options can be specified for all properties, or each individually
72+
or each individually:
73+
74+
```html
75+
<div data-parallax='{"translateY":"70%","opacity":{"to":1,"from":0,"duration":"85%"},"duration":"150%"}'></div>
76+
```
77+
78+
### Available options:
6579

6680
#### start
6781
**Type:** number or selector

0 commit comments

Comments
 (0)