Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

142
Vistas
Failing to initiate in-view.js

I suppose this question means that I am missing a basic understanding of how to implement a .git library.

Below, I am trying to use CamWiegert’s amazing in-view.js to trigger changes in the three boxes – but to no luck.

All help would be appreciated.

<style>
   body {
            background-color: lightskyblue;
        }

        section {
            height: 100vh;
            width: 100vw;
            display: flex;
            justify-content: center;
            align-items: center;
        }    

        .box {
            background-color: green;
            height: 40vw;
            width: 40vw;
        }

        .in-viewport .box {
            background-color: red;
        }
        
    </style>
</head>
<body>

    <section>
        <div class="box">
           
        </div>
    </section>

    <section>
        <div class="box">
           
        </div>
    </section>

    <section>
        <div class="box">
            
        </div>
    </section>
    
    <script src="https://unpkg.com/in-view@0.6.1/dist/in-view.min.js"></script>

    <script>
console.log('hello world')

inView('.section')
    .on('enter', section => {
        section.classList.add('in-viewport')
    })
    .on('exit', section => {
        section.classList.remove('in-viewport')
    });

inView.threshold(0.2)
    </script>

</body>
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda