function waitForSwiperInstance(selector, callback, timeout = 5000) {
const start = Date.now();
const interval = setInterval(() => {
const el = document.querySelector(selector);
if (!el) return;
const swiper = el.swiper || (window.jQuery && jQuery(el).data('swiper'));
if (swiper) {
clearInterval(interval);
callback(swiper);
}
if (Date.now() - start > timeout) {
clearInterval(interval);
}
}, 100);
}
document.addEventListener('DOMContentLoaded', function () {
waitForSwiperInstance('#my-carousel .elementor-image-carousel-wrapper', function (swiperInstance) {
// Handle clicks on dynamic images
document.querySelectorAll('.jet-listing-dynamic-image__link').forEach(link => {
link.addEventListener('click', function () {
const img = this.querySelector('img');
const altText = img?.getAttribute('alt')?.trim()?.toLowerCase();
if (!altText) return;
const slides = swiperInstance.slides;
let matchedIndex = -1;
slides.forEach((slide, index) => {
if (slide.classList.contains('swiper-slide-duplicate')) return;
const caption = slide.querySelector('.elementor-image-carousel-caption');
const captionText = caption?.textContent?.trim()?.toLowerCase();
if (captionText === altText && matchedIndex === -1) {
matchedIndex = index;
}
});
if (matchedIndex !== -1) {
swiperInstance.slideTo(matchedIndex);
}
});
});
// Handle button with show-first-image
document.querySelectorAll('[show-first-image="true"]').forEach(button => {
button.addEventListener('click', function () {
swiperInstance.slideToLoop(0);
});
});
});
});
Test3
Alfredo de Musset 309, Polanco, Polanco III Sección, Ciudad de México, CDMX
$20,000 /m²
($46,000,000)
Enso-D2
View the
3
properties
Space Details
test 3 test 3 test 3 test 3
Highlights
High-traffic street
In shopping mall
Multiple access points
Near public transport
Valet parking
Within an industrial park
Location
Contact Advertiser
Contact the advertiser for more information about this property.
Explore Similar Corporate Properties
jQuery(document).ready(function() {
jQuery('#go-back').on('click', function() {
window.history.go(-1);
return false;
});
});








