Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

177
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda