window.addEventListener('load', function() { setTimeout(function() { document.querySelectorAll('.et_pb_image_wrap').forEach(function(wrap) { var img = wrap.querySelector('img'); if (!img) return; var text = img.getAttribute('title') || img.getAttribute('alt'); if (!text) return; var existingCaption = wrap.querySelector('.image-caption'); if (existingCaption) { existingCaption.remove(); } var caption = document.createElement('div'); caption.className = 'image-caption'; caption.textContent = text; wrap.appendChild(caption); if (!wrap.classList.contains('caption-bound')) { wrap.classList.add('caption-bound'); wrap.addEventListener('click', function() { document.querySelectorAll('.et_pb_image_wrap.caption-active') .forEach(function(el) { el.classList.remove('caption-active'); }); wrap.classList.add('caption-active'); }); } }); }, 500); }); document.addEventListener('click', function(e) { var container = e.target.closest('.et_pb_image'); if (!container) return; var img = container.querySelector('img'); var caption = container.querySelector('.image-caption'); if (!img) return; var text = img.getAttribute('title') || img.getAttribute('alt') || (caption ? caption.innerText : ''); if (!text) return; setTimeout(function() { var mfpTitle = document.querySelector('.mfp-title'); if (mfpTitle) { mfpTitle.innerText = text; } }, 300); });

Category: Safety Fence

[wpseo_breadcrumb]
[et_pb_blog_extras use_current_loop="on" blog_layout="masonry" show_comments="off" _builder_version="4.23" _module_preset="default" hover_enabled="0" global_colors_info="{}" masonry_columns_last_edited="on|phone" sticky_enabled="0" masonry_columns_tablet="2" masonry_columns_phone="1"][/et_pb_blog_extras]