Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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!

    #228291

    Hey 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,
    Ismael

    #228417

    Hey 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

    #228899

    Hi!

    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!
    Peter

    #228989

    Wow, 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.
    #229959

    Hi!

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.