Parallax Disabled via JavaScript... what is the function being used?

I figured it would be faster to ask here instead of digging through the theme files.

Noticed parallax becomes disabled on mobile for images, changing the element from an <img src=""> to a simple CSS background-image property.

Currently, we have a script on the site that replaces the images in a slider-like fashion, without affecting the text I have overlayed on the image.  The thing is, since the parallax becomes disabled on tablet/mobile devices, it's not able to tend to changing the background-image property; only the <img> src.

What function is being used to detect tablet/mobile devices?  I'm looking to add an if/else statement to my function, separating the function to tailor towards tablet/mobile devices (background-image) and desktop/laptop devices (<img src>).

To reiterate, I know there is a function that detects the user's browser.  What is that function, and are there attributes tied to it that I should know about?

Comments

  • Hi,

    the whole code responsible for responsive attributes is located under responsive.css file but because what you ask for requires files customization what in reference to Item Support Policy is not allowed, you need to do all customization on your own. But if you don't know how to do this, you should contact with your web developer.

    Thanks!
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.