-
AuthorPosts
-
May 19, 2017 at 9:11 pm #796771
Hi,
I’ve already set a flex column with an image element and I want to add a parallax effect to it.
I know you can make parallax color sections but in this case I need to parallax only an element inside the color section. I know it’s possible through CSS but everything I’ve tried doesn’t work.
Can you help?
thanks,
YaelMay 19, 2017 at 9:13 pm #796772Oh, forgot the link:
https://backpack25o.wpengine.com/?page_id=38- This reply was modified 7 years, 6 months ago by yaelbar.
May 23, 2017 at 7:54 am #798099Hi,
Thank you for using Enfold.
Could you please provide a screenshot of the image or element that you want to modify? Have you tried adding the the image as column background? Add a custom css class attribute to the column then set the background-attachment property to “fixed”. Use the Separator / Whitespace element to create an invisible content inside the column.
// http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/
Best regards,
IsmaelMay 23, 2017 at 8:34 pm #798486It’s the big helmet on this page: https://backpack25o.wpengine.com/?page_id=38
I didn’t really understand your suggestion… I’m attaching my credentials, can you take a look?May 24, 2017 at 4:10 pm #798995Hi,
Sorry for the delay. I kind of destroyed the layout of the page a bit. Do you have a backup of the page? And could you please provide an example of the parallax effect that you’re after? Is this the image that you want to modify?
Best regards,
IsmaelMay 24, 2017 at 7:20 pm #799099Hi,
No worries and yes, that is the right image.
I want it to move like it does in here:
https://ls2helmets.com/il/road-racing/arrow-cThanks,
YaelMay 25, 2017 at 12:35 am #799273Hi,
Thank you for the info. We created an example in the following test page.
// http://backpack25o.wpengine.com/?page_id=439 (hosted on WPengine)
Best regards,
IsmaelJanuary 30, 2020 at 12:41 am #1179654Sorry for warming up this old thread, but could you pls provide your solution again, because I try to achieve the same feature?
Thanx
ManuJanuary 30, 2020 at 12:51 pm #1179820Hi Manu,
Parallax is only available in the color section as of now.
If you need further assistance please let us know.
Best regards,
VictoriaJanuary 30, 2020 at 12:51 pm #1179821Hi Manu,
Parallax is only available in the color section as of now.
If you need further assistance please let us know.
Best regards,
VictoriaJanuary 30, 2020 at 4:04 pm #1179945Hi Victoria,
sry for asking again, but it seems that Ismael provided a solution to achieve the same effect like the helmet in the third section of this link: https://ls2helmets.com/il/road-racing/arrow-cj
So could you please check this again?
Regards,
ManuJanuary 31, 2020 at 11:43 am #1180235Hi Manu,
That page is going to a 404 page. But I’ll ask Ismael to reply here for you.
Best regards,
VictoriaJanuary 31, 2020 at 1:25 pm #1180258Hey!
@brandpirate: Honestly, we already forgot what we did here. Can you create a new thread/ticket and post the details in the private field? The page that you posted above leads to 404.Best regards,
IsmaelJanuary 31, 2020 at 1:27 pm #1180259Hey Ismael,
thx for reply, but if this link doesnt work pls scroll up and click on the link from yaelbar (24th of may 2017). This works for me. If it doesnt work for you, I will open another thread.
Cheers
ManuFebruary 3, 2020 at 11:39 am #1180844Hi,
The site is not using the Enfold theme. Anyway, he added the parallax script in the custom.js file. (see private field)
This is the script:
$(window).bind('scroll', function () { $('.parallax').each(function () { var $$ = $(this); offset = $$.offset(); windowTop = $(window).scrollTop(); var ajuste = (($$.height() - $$.parent('div').height()) / 2); ///50 h menu var newCoord = ((offset.top - windowTop) * 0.25) - ajuste; $$.css({ 'transform': 'translateY( ' + (newCoord) + 'px)' }); }); });
The image tag’s class attribute should contain a value called parallax.
Example:
<img src="https://site.com/img/pages/helmet.png" alt="" class="itembackground parallax">
Best regards,
IsmaelFebruary 3, 2020 at 11:15 pm #1181082Hey Ismael,
thank you for your reply. I put this code into my child-themes function php, but the got an error and couldn’t save it. Is there a syntax?
syntax error, unexpected '(', expecting variable (T_VARIABLE) or '{' or '$'
February 5, 2020 at 4:22 am #1181615Hi,
You have to add the code in an external file, or use the following hook to insert it directly in the head tag.
// https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/#add-a-script-to-head-section
// https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/#add-a-script-to-footer-sectionBest regards,
IsmaelFebruary 5, 2020 at 7:10 pm #1181888Hey Ismael,
first of all I want to thank you for your help. I decided to use a themeforest-plugin instead from Scrollmagic that does the trick. So you can close this thread (but I will try your solution later on).
If you want, you can have a look at my site to watch the parallax-effect: https://hochzeitsfotograf-coburg.com/
Thx
ManuFebruary 5, 2020 at 11:00 pm #1181914hm – on your page i wouldn’t call this a parallax effect. Anyway – i did it similar to Ismael but a bit easier to understand.
See here : https://webers-testseite.de/images-in-motion/by the way what plugin is your choice now?
February 6, 2020 at 12:20 am #1181935Hi Günni,
first of all I want to say thank you because of your incredible useful tips across all topics here in the Enfold forum that often helped me solving my problems.
To your post: A parallax effect uses different movement speeds across various levels of content. Here I use up to three levels: a background and one or two layers (background, text, image) – all with different movement speed. So yes I would call it parallax – connected to scroll. Sadly your example works only with mobile devices for me (and there its jittering a lot). On my mac (with up to date Chrome) It doesnt do anything, but it would be very great to get this to work. And the plugin of my choice is called “Scrollmagic for WordPress” (codecanyon). The plugin has a very easy to use graphic user interface – very intuitive and it also can draw svg on scroll – but there is also (I think a free?) non graphical version.
Cheers
ManuLink to the addon: https://codecanyon.net/item/scroll-magic-wordpress-scrolling-animation-builder-plugin/19418234
non-graphic version: https://scrollmagic.io/February 6, 2020 at 1:56 pm #1182012yes you are right – i had to erase the webp test on my test-page and include a throttle function.
now it runs on chrome and on a ipad mini – but on both too buggy – it maybe a matter of my functions.php on that test-page of more than 2000 lines.So i test now ismaels version!
February 6, 2020 at 2:14 pm #1182015Thanks Günni for your engagement! I am very exited about your results.
-
AuthorPosts
- You must be logged in to reply to this topic.