Сила щелкнуть btn с помощью jQuery

example:

<button id='testButton'>Test</button>

<script>
$(function(){
   $('#testButton').on('click' , function(){
        alert("I've been clicked!");
   });

   //now on another event, in this case window resize, you could trigger
   //the behaviour of clicking the testButton?

  $( window ).resize(function() {
        $('#testButton').trigger( "click" );
  });

});

</script>
Inquisitive Iguana