- This topic has 10 replies, 2 voices, and was last updated 5 years, 9 months ago by Ivan Cazorla.
-
AuthorPosts
-
May 31, 2018 at 2:58 am #588555Ivan Cazorla
Hi there, is there any way to scroll through one video with a fixed position as you keep scrolling down?
Website example is located at the end of the landing page, just before the footer: https://www.audi.es/es/web/es/modelos/a7/nuevo-a7-sportback.html
Or is it better to achieve the same effect using photos?
thanks,
ivanMay 31, 2018 at 3:47 am #588596DavidStaffCustomer SupportHi Ivan,
the element itself has a sticky property attached to it like so:
div { position: -webkit-sticky; position: sticky; top: 0; }
This will always stick the element when it reaches the top of the screen – the video player is using a on scroll script to animate and to remove the sticky property when video is ended. I am not sure where to begin with that one!
May 31, 2018 at 3:55 am #588604Ivan CazorlaThe stick to the top works now and I’ll try to find another solution for the video scroll script thing.
What kind of script should I use to remove the sticky property when the div is ended?
thanks,
IvanMay 31, 2018 at 4:24 am #588622DavidStaffCustomer SupportThat get’s quite complicated, considering a stuck element never scrolls off the screen. It either needs to be nested in a container that can scroll or another element to push it off the screen. For this sort of function you may want to check out this plugin:
https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/
Doing this with the video player gets even more complex, i haven’t been able to find all the code or a plugin that can do this.
May 31, 2018 at 4:27 am #588624Ivan CazorlaHi there, thanks I’ll check that out. I’ve found a plugin called Scroll Magic that in theory should work, but I’ve tested it out and seems to not work with GeneratePress.
http://scrollmagic.lamblue.com/sequence-images/
thanks,
IvanMay 31, 2018 at 4:34 am #588630DavidStaffCustomer Supporthmm never seen that and the site lacks any documentation you may want to check the GitHub for some of the documentation and usage:
June 7, 2018 at 3:18 am #593855Ivan Cazorlathanks, haven’t found the issue why this plugins doesn’t work with GeneratePress though.
thanks,
IvanJune 7, 2018 at 3:20 am #593859DavidStaffCustomer SupportHave you tried it on the TwentySeventeen theme?
June 7, 2018 at 3:22 am #593863Ivan CazorlaOh, nope. I should try it on that one, but regardless it works or not, I’d need it to be working on GeneratePress because that’s the theme I’m most used to and want to work with.
thanks,
ivanJune 7, 2018 at 3:26 am #593869DavidStaffCustomer SupportHi Ivan, it’s a good way of testing if there is a conflict between a plugin and GP, if it doesn’t work on TwentySeventeen then, well i would say its outdated code, if it does work then maybe it’s something we can investigate.
June 7, 2018 at 3:28 am #593872Ivan CazorlaMakes sense, I’ll try it out now and let you know.
-
AuthorPosts
- You must be logged in to reply to this topic.