Call event when performing another action
<p>This is action performed when I click on button:</p>

<pre><code>$('div.my-button').on('click', 'button', function(e) {
        // some code
});
</code></pre>

<p>How can I call this event when performing another action, e.g. on keypress? Should I move code of this event to separate function or I can call a click or something?</p>

<p>I tried to call click:</p>

<pre><code>$('div.my-button').click() 
</code></pre>

<p>but the action was not performed.</p>

<p>I use jquery 1.9+</p>

<p>EDIT 1:</p>

<pre><code>    $('div.my-button').on('click', 'button', function(e) {
        var $this = $(this);
        var request = $.ajax({
            url: "/my_url/",
            type: "POST",
            data: {
                "value": $this.val(),
            },
            success: function(result){
                //some actions
            },
            error: function(result){
                //some actions
            }
        });
    });
</code></pre>

<p>I try to call this using:</p>

<pre><code>    jQuery(document).bind('keydown', 's',function (e){
        $('div.my-button').trigger('click');
    });
</code></pre>

<p>For binding keys i use <a href="https://github.com/jeresig/jquery.hotkeys/blob/master/README.md" rel="nofollow">jquery.hotkey</a></p>

<p>.trigger does not work for me.</p>
