Actually $(".a").trigger('click'); fires a click event, but this does not mean that he clicks on the link, instead he will execute the event handler if you already have one, i.e.
$(".btn, .btn2").on('click',function () { $($(".a")[0]).trigger('click');
The above example will trigger the click a event and execute the handler (anonymous function) that has already been registered for this event using
$(".a").on('click', function (e){...});
Demo.
The alpha
source share