JSFiddle - React, Tailwind, and code Playground
by jannis
HTML
<a href="#">Click Me</a>
<hr />
<p>Log:</p>
<hr />
<div></div>
JavaScript
jQuery(document).ready(function($) {
function showMe() {
// should log the runMe as the caller and showMe as callee
console.log('Callee: ',arguments.callee.name)
console.log('Caller: ',arguments.callee.caller.name);
}
function runMe() {
// getting executed as a button is pressed.
showMe();
}
$('a').bind('click', function(e) {
e.preventDefault();
runMe();
});
});