• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Parallax Effect Not Working on Mobile Devices

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Parallax Effect Not Working on Mobile Devices

This topic is: not resolved

Tagged: mobile, parallax, pro

  • This topic has 6 replies, 2 voices, and was last updated 7 years, 3 months ago by leighm.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • December 7, 2015 at 3:17 am #172913
    leighm
    Member

    I'm having a problem with the Parallax Pro theme. The parallax effect works fine on a desktop or laptop. Even when I drag the browser to engage the smaller media queries, the parallax still works on a desktop. However, if I then view the site on a mobile the parallax doesn't work.

    I've messed around with the CSS for these sections and nothing has worked. Now, I've concluded that it's not a CSS issue at all. I think there is something - maybe in the javascript or functions file - that prevents the parallax working by default on a mobile. Some kind of rule that says: if viewing device is a mobile, then stop parallax from working. However, I cannot find anything that's doing this.

    I'm look for a way to override this default behaviour for mobiles.

    Thanks.

    http://burrenjw.ie/dev
    December 7, 2015 at 9:02 am #172956
    carasmo
    Participant

    On scroll events has long been known to not work the same on touch devices because...

    All browsers fire an onscroll event on the window object whenever the window is scrolled. On desktop browsers this event is fired continuously as the user scrolls, but on most all mobile browsers the event is not fired until the scrolling action comes to a complete stop.

    This is native behavior.


    Genesis Theme Customization and Help

    December 7, 2015 at 9:17 am #172963
    leighm
    Member

    Thanks for your reply, Carasmo. I wasn't aware of this behaviour.

    You mention that on mobiles the event is not fired until scrolling action comes to a complete stop. If that's the case shouldn't I see some kind of jump in the image, once I stop scrolling? For me the image doesn't move at all.

    December 7, 2015 at 9:21 am #172964
    leighm
    Member

    Carasmo, I forgot to mention, on an iphone, there is a setting in safari that allows you to "Request Desktop Site" version. When you do this the parallax works, which seems strange given the scroll behaviour of mobile devices?

    December 7, 2015 at 10:55 am #172997
    carasmo
    Participant

    https://www.tjvantoll.com/2012/08/19/onscroll-event-issues-on-mobile-browsers/ and google for more recent articles on the subject. You'll find that it's not fruitful.

    If a device its in desktop mode, I would assume that the touch events are turned of on the device. Natively, though it fires after the scroll, so parallax won't work.


    Genesis Theme Customization and Help

    December 7, 2015 at 10:59 am #173000
    carasmo
    Participant

    The image doesn't move because it's background position is adjusted on the onscroll event and it's likely that the CSS position fixed and the background-size:cover (which IOS has never worked great) is the culprit. I don't know, I never bothered with this since I've known for a long time it won't give the same results so I've explained that progressive enhancement includes behavior on devices and if a device doesn't handle certain style or jQuery or whatever, it will fallback to the native behavior which won't include all the desktop stuff necessarily.


    Genesis Theme Customization and Help

    December 8, 2015 at 4:16 am #173167
    leighm
    Member

    Thanks, Carasmo, for the explanation and for sending on those resources. Very helpful.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble