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

224
Views
¿Cómo activar el evento de clic en la casilla de verificación incluso si se verifica a través del código Javascript?

Tengo muchas casillas de verificación en mi página y hay una casilla de verificación Seleccionar todo que marca todas las casillas de verificación. De alguna manera, quiero emular ese evento de clic de la casilla de verificación incluso si está marcado/desmarcado a través del botón Seleccionar todo. ¿Cómo puedo hacerlo?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Puede usar el método jQuery .trigger() . Ver http://api.jquery.com/trigger/

P.ej:

 $('#foo').trigger('click');
over 4 years ago · Santiago Trujillo Report

0

Obtener estado de verificación

 var checked = $("#selectall").is(":checked");

Luego para establecer

 $("input:checkbox").attr("checked",checked);
over 4 years ago · Santiago Trujillo Report

0

También puede usar la función .change()

P.ej:

 $('form input[type=checkbox]').change(function() { console.log('hello') });
over 4 years ago · Santiago Trujillo 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!