$(document).ready(function () { $(window).load(function () { run1(); }); $('body').on('click', '.jq', function (e) { run2(); }); function run1() { alert('run1'); } function run2() { alert('run2'); } });