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

213
Views
Cómo deshabilitar un DIV al acceder al sitio a través de PWA

Desarrollé un sitio y también quiero usarlo como PWA (aplicación web progresiva).

Pero quiero ocultar elementos específicos en el PWA. He probado el enfoque CSS:

 @media all and (display-mode: standalone) { .noShowApp { display: none; }

}

Y el enfoque JS:

 function isRunningStandalone() { return (window.matchMedia('(display-mode: standalone)').matches); } if (isRunningStandalone()) { alert('hi'); hide(document.getElementById('features')); }

Recibo mi 'alerta' en la aplicación, pero la sección que quiero ocultar no está oculta....

Esta es la sección que quiero ocultar:

 <section class="py-5 border-bottom noShowApp" id="features">

¿Puede alguien indicarme la dirección correcta sobre cómo hacer que cualquiera de estos métodos (CSS o JS) funcione? Prefiero el enfoque CSS, pero si eso no es posible, JS funcionará bien.

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!