Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. $(".my_button").click(function(){
  2.  
  3. // if event fired form .trigger() method from other method or event then do something
  4.  
  5. // actuall code for click event is here
  6. })
  7.  
  8. .....
  9. .....
  10.  
  11. $('.other_first_button').click(function(){
  12. // code of other first button
  13. $(".my_button").trigger('click');
  14. });
  15.  
  16. .....
  17. .....
  18.  
  19. $('.other_second_button').click(function(){
  20. // code of other second button
  21. $(".my_button").trigger('click');
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement