I have a button and a select in my form. The button has onclick event while the select has onchange event. How to make the select has both onclick and onchange event?
This is the script:
$('#i_btn').on('click', function(){
alert('Event 1');
});
$('#i_sel').on('change', function(){
alert('Event 2');
});
When the select is changed, it should do alert('Event 1'); alert('Event 2');. I do not want to rewrite the onclick code in onchange