![]() ![]() For example, if you pass 0 0, the element will start to move only after it has been scrolled to the middle of the viewport.Įvents used the same way as Options. Specify threshold for the parallax effect to kick in. Also you can use data attribute data-jarallax-element. Required jarallax/jarallax-element.js file. Play video only when it is visible on the screen. Start time in seconds when video will be started (this value will be applied also after loop).Įnd time in seconds when video will be ended. Also you can use data attribute data-jarallax-video. You can use Youtube, Vimeo or local videos. Required jarallax/jarallax-video.js file. querySelectorAll( '.jarallax '), ) Options For Video (+ supported all default options) You can disable parallax effect and/or video background on mobile devices using option disableParallax and/or disableVideo. Uses ResizeObserver, which has a small browsers compatible. The image will be set on the background.Įxperimental! Automatically recalculate parallax size and position when the size of parallax block changed (dynamic content inside). The image will be set on the background.ĭisable video load on specific user agents (using regular expression) or with function return value. More info here - Issue 13.ĭisable parallax on specific user agents (using regular expression) or with function return value. Use custom DOM / jQuery element to check if parallax block in viewport. Keep tag in it's default place after Jarallax inited. Supported only background-position values. If you use tag for background, you should add object-position values, else use background-position values. If you use tag for background, you should add object-fit values, else use background-size values. Image tag that will be used as background. Scroll, scale, opacity, scroll-opacity, scale-opacity. ![]() Options can be passed in data attributes or in object when you initialize jarallax from script. We can accomplish this by add the following rules to the parallax container and the parallax layers respectively: perspective-origin: bottom right transform-origin: bottom right We now have a. Note: this is more like experimental feature, so the behavior could be changed in the future releases. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |