How to get or fetch button click event listener using javascript or jquery
<p>Is it possible in JavaScript or jQuery to get or fetch the <code>click</code> event listener of a button element? How?</p>

<p>For example the HTML,</p>

<pre><code>&lt;button id="btn1"&gt;Button 1&lt;/button&gt; 
</code></pre>

<p>and the jquery :      </p>

<pre><code>$("#btn1").on("click", function() {
     alert("Test");
});
</code></pre>

<p>and i want to do something like this.</p>

<pre><code>// this is what i'm asking ( capture the click event of the button 1)
var f = $("#btn1").attr("onclick") --&gt; undefined;

$("#btn1").on("click", function() {
     somefunction();
     f();

});
</code></pre>