lundi 1 août 2016

is it possible to use .stopPropagation() on .trigger() function?

How can I use the .trigger()-event together with .stopPropagation() ? I need to simulate a submit event without triggering the submit event.

$('.form .submit').trigger('click', function (e) {
    e.stopPropagation();
});

does not work. Is there any way to achieve this?

Aucun commentaire:

Enregistrer un commentaire