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

205
Vistas
Is possible get attribute value and manipulate tags added by Javascript?

I am trying to integrate an image matcher into a constructor that uses lodash. The builder uses lodash in the live editor and php for the public part. In the public part everything works correctly. But in the editor it doesn't and it shows me the error Uncaught TypeError: this.el is null. which means that the element has not been found. But the element exists only that it is added by lodash. So my question is: Is it possible to get the ID attribute and manipulate elements added by Javascript (lodash)?

Lodash Code

    <# if(image_before.src && image_before.src) { #>
        <div class="image-compare-image">
        <div id="image-compare-1652909731591" class="image-compare-image-ct">
            <img class="sppb-img-responsive" src="source-here" alt="Alt">
            <img class="sppb-img-responsive" src="source-here" alt="alt">
        </div>
        </div>
    <# } #>

JS

    const compare_1652909731591 = document.getElementById("image-compare-1652909731591");
    const viewer_1652909731591 = new ImageCompare(compare_1652909731591).mount();

Thanks

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