JSFiddle - React, Tailwind, and code Playground

by shapeshifta

JavaScript

/* Step3 - Hotelimages - Carousel */

var hotelTipps = $('div.boxHotelFooter');

if (hotelTipps.length && typeof $.fn.lazyload === 'function'&& typeof $.fn.jcarousel === 'function') {
    /* LazyLoad für das Laden der Thumbs in Schritt 3 */
    var images = hotelTipps.find('img.lazy');
    images.lazyload();
}

/* Schritt3 - Bildergalerie */
$('a.hotelThumbsPic').on('mouseover click', function(e) {
    if (e.type !== 'mouseover') {
        return false;
    }
    var imageLargeURL = this.href;
    
    //bitte möglichst nie nur nach Klasse selektieren!!!
    $(this).parents('.boxHotel').find('.hotelPic img').attr('src', imageLargeURL);
});