What if different elements have to trigger the same function but on different events ?
$(\'#btnNext\').on(\'click\', function() { /*Same thing*/ }); $(\'#txtFie
You included a clue in your question: "trigger the same function" - so simply bind the same function:
function commonHandler(e) { /* your code */ } $('#btnNext').on('click', commonHandler); $('#txtField').on('change blur', commonHandler);