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);
});
});
});
});
t1
Calle de Mesones, Historic center of Mexico City, Centro, Mexico City, CDMX, Mexico
$436 /m²
($285,144)
Enso-D2
View the
3
properties
Space Details
However, navigating the commercial real estate industry can get complicated if you aren't informed. So join us as we explore this complete guide to renting a commercial space safely.
Highlights
Internal roads
Within an industrial park
Location
Contact Advertiser
Contact the advertiser for more information about this property.
Explore Similar Development Projects
jQuery(document).ready(function() {
jQuery('#go-back').on('click', function() {
window.history.go(-1);
return false;
});
});

