$(function () { var xMediaQuery = window.matchMedia("(min-width: 40em)") checkOverflowInfo(xMediaQuery) // Call listener function at run time xMediaQuery.addListener(checkOverflowInfo) // Attach listener function on state changes window.addEventListener('resize', infoBox); window.addEventListener('DOMContentLoaded', infoBox); if (typeof showAllContentLangToken === 'undefined' ) { showAllContentLangToken = ''; } window.showAllContentLangToken = showAllContentLangToken; }); function infoBox(evt) { let $arrInfoBox = $(".news-event__content-elements .frame-layout-news-info-box-left,.news-event__content-elements .frame-layout-news-info-box-right,.news-event__content-elements .frame-layout-news-info-box-center,.news-event__content-elements .frame-layout-news-info-box"); let arrInfboxCnt = $arrInfoBox.length; let lang = document.getElementsByTagName('html')[0].getAttribute('lang'); for (let i = 0; i < arrInfboxCnt; i++) { // Get id let infoBoxId = $arrInfoBox[i].id; if ($arrInfoBox[i].parentElement.className.indexOf('frame-layout-news-info-box-collapse-wrapper')) { $("#" + infoBoxId).wrap('
'); // Add button let newInfoboxButton = $('