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

92
Views
Create a javascript pop-up with createElement

I would like to create a pop-up when I press "details". I don't know how to deal with "createElement".

let ul = document.createElement('ul');

let detail = document.createElement('details');
detail.appendChild(ul); // element du detail

let summary = document.createElement('div');
summary.appendChild(detail);

let colDetail = document.createElement('td');
colDetail.className = 'td-detail';
colDetail.appendChild(summary);
<th>Détails</th>

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

0

You can look into jquery popup overylay plugin.

https://dev.vast.com/jquery-popup-overlay/

The instructions on how to make an overlay popup are great.

about 4 years ago · Juan Pablo Isaza Report

0

You can use .addEventListener() or .onClick methods on element.

  • MDN addEventLister Link
  • MDN onClick Link
about 4 years ago · Juan Pablo Isaza Report

0

A popup in the page is called a modal. The easiest way to do it is not to create the new element, but rather have it all along with a CSS-class that is hidden:

.nodisplay {
    display: none
}

Then you hide or show it removing the class with

element.classList.add('nodisplay')

or

element.classList.remove('nodisplay')
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!