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

134
Vistas
JQuery .width() doesn't change the width

I have got two divs, one img and one video, which adjusts to the size of the screen automatically. I want my image to be the same width with the video and found this code on the web (.you is the video and .santa is the image):

<script> 
    $( window ).resize(function() {
        $(".santa").width($(".you").width());
    });            
</script>

It does not change the width though.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It changes the width I wrote an example here for you, to check it just resize the page splitter

<div class="santa" style="width:100px;background-color:red">
santa
  <div class="you" style="width:200px;background-color:green">
    you
  </div>
</div>

$( window ).resize(function() {
  $(".santa").width($(".you").width());
}); 
about 4 years ago · Juan Pablo Isaza Denunciar
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