Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

176
Vistas
How to trigger an event in jQuery?

I'm working on a page that opens a modal window when the user clicks a certain radio button. I want to trigger whatever that event handler is via my own jQuery code. Right now, I'm attempting to mimic a user clicking on the radio button by:

$("#myRadioButton").trigger("click");

The code works somewhat. The state of the radio button does become selected. However, the modal window does not open.

What must I do to trigger the events and event handlers that make the modal window open?

(Also, is there a way in Chrome DevTools to see what events are attached to an element?)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This will make the click function work, with a id on the element. You will need to make some logic for the modal itself, inside the function.

Not sure there is a way to see the events in the developer console.

 $( "#myRadioButton" ).click(function() {
    
    //Whatever you wants to happen, when you click the button
     alert( "You clicked on #myRadioButton" );
    });

Try and check out -> https://jquerymodal.com/

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda