A
A
atlantis1142018-02-04 17:13:54
JavaScript
atlantis114, 2018-02-04 17:13:54

How to make click actions in jQuery (after click event)?

Good afternoon. I want to make it so that when you click on one element, another element is clicked through jQuery.
Example: by clicking in the text on the word "use the feedback form on our site", the feedback form in the site header immediately worked, opening a modal window.
I kind of imagined it like this:

jQuery("при клике сюда").on("click", function() {

  jQuery("кликается данная форма").click(); // не работает

});

Please tell me how this idea can be realized.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Nagorny, 2018-02-04
@atlantis114

jQuery("при клике сюда").on("click", function(e) {
 e.preventDefault()
  jQuery("кликается данная форма").trigger('click'); 
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question