setTimeout(function(){ $(".t-slds__wrapper .t-slds__bgimg").each(function(i, item){ $(item) .on('mouseover', function(){ $(item).children('.photo').css({'transform': 'scale(' + scale +')'}); }) .on('mouseout', function(){ $(item).children('.photo').css({'transform': 'scale(1)'}); }) .on('mousemove', function(e){ $(item).children('.photo').css('transform-origin', ((e.pageX - $(item).offset().left) / $(item).width()) * 100 + '% ' + ((e.pageY - $(item).offset().top) / $(item).get(0).offsetHeight) * 100 +'%'); }) .each(function(){ if (i == 0) { h = item.offsetHeight; w = item.offsetWidth; } $(item) .append('
') .children('.photo').css({'background-image': 'url('+ $(item).attr('data-original') +')'}).css({"height": h + "px", "width": w + "px"}); $(item).css("background-image", "") }) }) }, 300); } }) // Фикс размера при resize var parent, h, w; $(window).on("resize", function(){ setTimeout(function(){ parent = $(".photo").parent(); if (parent.length > 0) { parent = parent.get(0); } h = parent.offsetHeight; w = parent.offsetWidth; $(".photo").css({"height": h + "px", "width": w + "px"}) }, 200) }) // Если сразу открыта карточка товара if (window.location.href.search("tproduct") > 0 && !is_touch_device()) { setTimeout(function(){ $(".t-slds__wrapper .t-slds__bgimg").each(function(i, item){ $(item) .on('mouseover', function(){ $(item).children('.photo').css({'transform': 'scale('+ scale +')'}); }) .on('mouseout', function(){ $(item).children('.photo').css({'transform': 'scale(1)'}); }) .on('mousemove', function(e){ $(item).children('.photo').css('transform-origin', ((e.pageX - $(item).offset().left) / $(item).width()) * 100 + '% ' + ((e.pageY - $(item).offset().top) / $(item).get(0).offsetHeight) * 100 +'%'); }) .each(function(){ if (i == 0) { h = item.offsetHeight; w = item.offsetWidth; } $(item) .append('
') .children('.photo').css({'background-image': 'url('+ $(item).attr('data-original') +')'}).css({"height": h + "px", "width": w + "px"}); $(item).css("background-image", "") }) }) }, 300) }
Металлические двери от Сталгранд в Москве и Московской области
· Все двери соответствуют ГОСТ
· Изготавливаем под размер вашего проёма
· Есть доставка и установка
· Большой выбор материалов, цветов и фурнитуры
Made on
Tilda