Let some element be assigned an event:

$('#someelement').click(function() { // обработчик события 1 }); 

and you need to call the handler of this event, for example, on another event:

 $('#otherelement').keydown(function() { // обработчик события 2 // а вот здесь надо вызвать обработчик события 1. }); 

How can I do that?

    2 answers 2

     $('#otherelement').keydown(function() { $('#someelement').click(); }); 
       $('#someelement').trigger('click'); 

      Source: http://jquery.page2page.com/index.php5/%D0%92%D1%8B%D0%B7%D0%BE%D0%B2_%D1%81% D0%B1 % 8B% D1% 82% D0% B8% D1% 8F