Giter VIP home page Giter VIP logo

Comments (4)

mciastek avatar mciastek commented on July 28, 2024 1

Ah, I see. Unfortunately there is no such option in sal.js, but you can easily make it work, wrapping sal's initialisation in if block. Here's an example:

// filched from https://github.com/jlmakes/scrollreveal/blob/master/src/utils/is-mobile.js
// though it may be too weak condition,
// better use https://github.com/juliangruber/is-mobile
const isMobile = /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);

if (!isMobile) {
  sal(); // init sal.js only for non-mobile devices
}

This code will initialise sal only for non-mobile devices. Let me know if that's what you've been looking for.

from sal.

mciastek avatar mciastek commented on July 28, 2024

Hi, there's no such option in sal. Honestly, I'm not sure if I understand your requirement. Could you create a simple example using Codesandbox?

from sal.

igorgarciaco avatar igorgarciaco commented on July 28, 2024

Well I was just wondering if it has an option for mobile like this https://scrollrevealjs.org/api/mobile.html

from sal.

mciastek avatar mciastek commented on July 28, 2024

Closing this issue. Reopen if needed.

from sal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.