The script does not work in the mobile version ( on mobile devices, the template is adaptive ). There are thumbnails that when clicked are displayed in another div 'e with <img ID=main_img . In the mobile version, when you click on a thumbnail, the first image is selected, but not the desired one.
$('.preview a').click(function() { way = $(this).children().attr("src"); console.log(way); $('#main_img').attr('src', way); function_name(); return false; }); At the same time, there is no problem in the desktop version. Can fancybox affect? Help to understand plz.