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

220
Views
Append div to hidden elements in Angular using jquery

I have this div

 <div class="col-md-4 solution" *ngIf="show">

 </div>

which is by default hidden now on button click i want to show that div and append another div to the solution div hide and show is working but append is not working for elements that are hidden.

   this.show=true;
   let area = $(".solution");
   let Detail = `<div class="class-1"> 
        <p>Text<p>
        </</div>`;
    area.append(Detail); 

Any solution to append the div. Thanks

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The .class selector selects all elements with the specific class.

area is a collection of elements

 var _that=this;
 setTimeout(function(){      
   if($(".solution") && _that.show == true){// If solution div is visible/shown
    let area = $('.solution:first')
    let Detail = `<div class="class-1"> 
    <p>Text<p>
    </</div>`;
    area.append(Detail); 
 }}, 200);

you need to append over the targeted div by element at index .

about 4 years ago · Juan Pablo Isaza Report
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!