Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1185201
    EveVaterlaus
    Participant

    How can I make parallax elements scroll at different speeds?

    The js is not doing it for me.
    Thanks
    Eve

    http://www.valerianamidwifeforyourlife.com/para/

    #1185227
    Rahul
    Moderator

    Hi there,

    Thanks for writing in!

    To change the speed, you can simply use following jQuery code under Custom > JavaScript in the Customizer:

    jQuery(document).ready(function() {

    //
    // Attach parallax handlers.
    //

    if (Modernizr.touch) {
    jQuery(‘.x-content-band.bg-image.parallax, .x-content-band.bg-pattern.parallax’).css(‘background-attachment’, ‘scroll’);
    } else {
    jQuery(‘.x-content-band.bg-image.parallax’).each(function() {
    var id = jQuery(this).attr(‘id’);
    jQuery(‘#’ + id + “.parallax”).parallaxContentBand(‘50%’, 0.3);
    });
    jQuery(‘.x-content-band.bg-pattern.parallax’).each(function() {
    var id = jQuery(this).attr(‘id’);
    jQuery(‘#’ + id + “.parallax”).parallaxContentBand(‘50%’, 0.5);
    });
    }

    });

    By changing 0.3 and 0.5 to your desired speed from 0 to 0.9 (default speed is 0.1 and 0.3).

    Hope this helps. 🙂 For more reference have a look at https://community.theme.co/forums/topic/parallax-background-speed/

    Thank you.

  • <script> jQuery(function($){ $("#no-reply-1185201 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>