Support for relativeToWrapper and improved wrapper (#35295)

Wrapper option takes an HTMLElement as well as a string.
RelativeToWrapper was a recent addition to the library.
This commit is contained in:
Arsen
2019-05-13 16:05:52 -07:00
committed by Nathan Shively-Sanders
parent fadde892e8
commit a0efee5960
+5 -1
View File
@@ -67,7 +67,11 @@ declare namespace Rellax {
/**
* By default, the position of parallax elements is determined via the scroll position of the body. Passing in the wrapper property will tell Rellax to watch that element instead
*/
wrapper?: string;
wrapper?: string | HTMLElement;
/**
* Do we want rellax element to be relative to the mentioned wrapper.
*/
relativeToWrapper?: boolean;
}
}