Skip to content

Commit fdeb5a1

Browse files
authored
fix for product tabs
1 parent 836e46c commit fdeb5a1

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

view/frontend/templates/lazy.phtml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,20 @@
1616
return true;
1717
});
1818
})();
19-
</script>
19+
</script>
20+
<script>
21+
require(['jquery', 'domReady!'], function($){
22+
var l = 'loaded';
23+
$('.product.info.detailed .data.item.title a').click(function(){
24+
$('.product.info.detailed img[data-original^="h"]').each(function(){
25+
var $t = $(this);
26+
if (!$t.hasClass(l)) {
27+
var src = $t.data('original');
28+
if (src) {
29+
$t.attr('src', src).addClass(l);
30+
}
31+
}
32+
});
33+
});
34+
});
35+
</script>

0 commit comments

Comments
 (0)