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

113
Views
Problema con los botones de alternar

Si hago clic en el icono de búsqueda, se abrirá el botón Atrás y la barra de búsqueda. Nuevamente hago clic en el botón Atrás, se abrirá el ícono de búsqueda

Probé con html interno.

Si hago clic en el icono de búsqueda, utilizo innerhtml para mostrar el botón Atrás y la barra de búsqueda. Pero si hago clic en el botón Atrás, ¿cómo mostrar el icono de búsqueda?

 container.insertAdjacentHTML('afterbegin', ` <header> <div id="chat-icon"> <div class="search"><i class="fas fa-search"></i></div> <div id="chat"><i class="far fa-edit"></i></div> </div> </header> <div id="group-list"></div>`); container.querySelector('header #chat-icon #chat').addEventListener('click', async() => { this.chat.container.querySelector('.groups').remove(); this.chat.container.insertAdjacentElement('afterbegin', this.createGroup.container); await this.createGroup.load(); }); container.querySelector('header .search').addEventListener('click', async() => { this.chat.container.querySelector('header .search').innerHTML = ` <div class="heading"> <div id="back-button"><i class="fa fa-arrow-left"></i></div> <div id="search-bar"></div> </div>` })
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

En lugar de .remove() y .load() , puede usar .hide para ocultar la barra de búsqueda y .show() para mostrarla.

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!