1👍
✅
As @freedomn-m suggested, the correct way to do that is:
$("#transaction_form_new, #transaction_form_edit").on
Both selectors inside a single string, using the comma selector
Source:stackexchange.com