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

321
Views
Cierre toastr.error después de unos segundos en Javascript

Estoy usando toastr.error('Testing pop-up') en Javascript para mostrarme una ventana emergente cuando hay un error en la aplicación, pero no puedo ver en la documentación oficial cómo cerrar esta ventana emergente después de X segundos automáticamente sin presionar ningún botón. ¿Alguien sabe cómo?

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

0

Puede configurar el tiempo de espera como:

Tiempos de espera
Controle cómo interactúa tostador con los usuarios configurando los tiempos de espera de forma adecuada.

 toastr.options.timeOut = 30; // How long the toast will display without user interaction toastr.options.extendedTimeOut = 60; // How long the toast will display after a user hovers over it

Referencia:

  • DOC oficial
  • ejemplo jugable
about 4 years ago · Juan Pablo Isaza Report

0

La firma para la función de error es:

 function error(message, title, optionsOverride) {

https://github.com/CodeSeven/toastr/blob/50092cc604850a16c985520b63df184d3e0b4086/toastr.js#L46

Puede pasar opciones para ocultarlo según sea necesario.

Puede jugar con las opciones para ver el mejor ajuste en la página de demostración:

https://codeseven.github.io/toastr/demo.html

ingrese la descripción de la imagen aquí

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!