$("[data-infopanel]").on('click','[data-infopanel-close]',function() {
   var $infoPanelElement = $(this).parent();
   var $infoPanelVersion = $infoPanelElement.data('version');

   $infoPanelElement.remove();

   var $localInfoPanelsData = JSON.parse(window.localStorage.getItem('info_panels') ?? '{}');
   $localInfoPanelsData[`info-panel-${$infoPanelElement.attr('data-infopanel')}`] = {
      version: $infoPanelVersion,
      interval: 'Infinity'
   };
   window.localStorage.setItem('info_panels', JSON.stringify($localInfoPanelsData));
});
