Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

204
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!