Tagged: parallax-ratio, scroller
-
AuthorPosts
-
February 23, 2014 at 4:57 pm #228137
Hi,
I think I posted this yesterday, but I cannot find it any more.
In the Enfold Demo there is this section that has a scrolling feature. (where stands: In case you need help)
How can I achieve this effect. I know it has something to do with a Color Section.
In firebug I found that is is achieved by using a parallax-ratio:v id="av_section_6" class="avia-section socket_color avia-section-default avia-no-shadow avia-full-stretch av-parallax-section avia-builder-el-47 el_after_av_section el_before_av_section container_wrap fullsize"> <div class="av-parallax avia-full-stretch" style="background-repeat: no-repeat; background-image: url("http://kriesi.at/themes/enfold/files/2013/04/room.jpg"); background-attachment: scroll; background-position: center top; height: 522.8px; transform: translate3d(0px, 41px, 0px);" data-avia-parallax-ratio="0.3"></div>
But I can’t find this feature anywhere and I want to edit it in somehow.
Can you help me out on this?
Thank you!February 24, 2014 at 2:33 am #228291Hey Aerny!
Please download the latest version of Enfold and update your theme. Use the Color Section then add a background image. Look for “Background Attachment” and select the “Parallax” effect.
Regards,
IsmaelFebruary 24, 2014 at 11:21 am #228417Hey Ismael,
Awesome! Thanks for pointing me to the new feature. Thanks!
Is there also a way to alter the percentage speed, somehow . . ?Thanks again, Arnold
February 25, 2014 at 8:17 am #228899Hi!
Yes – you can use a filter to change it. Open up functions.php and insert this code at the very bottom:
add_filter('avf_parallax_speed','avia_change_parallax_ratio', 10, 2); function avia_change_parallax_ratio($ratio, $id){ $ratio = "0.3"; return $ratio; }
By default the ratio is set to 0.3 but you can set a higher value (0.5) to increase the speed or a lower value to decrease it.
Cheers!
PeterFebruary 25, 2014 at 1:34 pm #228989Wow, awesome idea! Thanks for pointing this out Peter!
Can I paste this directly in the functions.php or is it better to past this in a custom_functions.php file?
Another question: does this newly added function bring in a box where one can change the values, or is it to be edited within the code itself?
- This reply was modified 10 years, 9 months ago by Aerny.
February 27, 2014 at 8:42 am #229959Hi!
You can add the code tp the parent theme functions.php (enfold/functions.php) or to the child theme functions.php. You must change the ratio directly in the code. If many users request a ratio option will add a new option field to the color section.
Regards,
Peter -
AuthorPosts
- You must be logged in to reply to this topic.