Accordion issue with Firefox

Hi There,

Hoping you can help. We’ve built a site that makes extensive use of accordions to hold very dense content. There is a print feature, where we want all the accordions to open prior to the print happening.

This solution works on Chrome and Edge, but not on Firefox - any pointers?

Avaxim - Immunisaton Advisory Centre

  // Enable print button
$("#print").click(function() { 
  var accordionToggleButton = $('.accordion-item-trigger');
  var evt = document.createEvent("MouseEvents");
  evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  $('.accordion-item-trigger').each(function() {$(this).click()});
  setTimeout(function() {window.print()}, 600); 

The timeout is necessary to allow the animations to process.