 <p>There are many ways. But as a beginner i would like to just add alert in each function:</p> <pre><code>$( document ).ready(function() { $("a").on('click', function() { $('c').css('opacity', '0.8'); alert('inside first'); }); $("ul#main li a").on('click', function() { $('c').toggle('.menu'); alert('inside first'); }); $("nav a").on('click', function() { callSomeFunctions(); alert('inside first'); }); }); </code></pre> <p>Also, working link: <a href="http://jsfiddle.net/wRZN6/" rel="nofollow">http://jsfiddle.net/wRZN6/</a></p>