I want to click on button 2 to trigger a click event on button 1.
However, when I try the following, nothing happens when clicking on #2: no alert for #1 or #2.
When you need to call click event of any button then syntax is as below
$('selector').trigger(event);
selector -> which tag's event you need to fire
event -> which event you need to fire
In your case you need to change following one line
$('#button-1').trigger(e);
here you need pass event of e like click event, select event, etc.
so solution is replace this line with any of the following line
$('#button-1').trigger(e.type);
$('#button-1').trigger("click");