Created
June 19, 2022 13:08
-
-
Save ofmarconi/c65663a119971107bd5764179b78af64 to your computer and use it in GitHub Desktop.
inside each .box copy the data-elementor-lightbox property of the element with the .elementor-custom-embed-image-overlay class and paste in the elements with the .title class inside that .box (by askjarvis.io)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const caixas = document.querySelectorAll('.caixa'); | |
caixas.forEach(caixa => { | |
const dataElementorLightbox = caixa.querySelector('.elementor-custom-embed-image-overlay').getAttribute('data-elementor-lightbox'); | |
const titles = caixa.querySelectorAll('.title'); | |
titles.forEach(title => { | |
title.setAttribute('data-elementor-lightbox', dataElementorLightbox); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment