How to run a Rigger after another Rigger

Asked

Viewed 105 times

0

How to make the second Trigger only run after the first Trigger to load the html completely?

$('#element-one').trigger('click');
// aguardar o primeiro ecento (carrega um html via ajax)

$('#element-two').trigger('change'); // só deveria ser executado depois do primeiro evento

1 answer

0

You can use the click() to point to the first click and then trigger the second click using the trigger():

$("#target").click(function() {
    $( "#segundoElemento" ).trigger("click");
});

Actually, I did, and there’s an example of that in documentation of trigger()

  • The problem is I need the first one to be a Rigger. It’s a sequence of triggered events.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.