$(function() { $('.goods_images_list').mouseleave(function(event) { $('.goods_images_list').removeClass('active').find('div').hide(); window.prd_hover = false; clearInterval(window.prd_interval); }); $('.prd-image a img').hover(function() { $('.goods_images_list div').hide(); clearInterval(window.prd_interval); window.prd_hover = this; $(this).parent().removeAttr('title'); setTimeout($.proxy(function() { var goods_images_list = $(this).closest('.prd-image').find('.goods_images_list'); var size = goods_images_list.addClass('active').find('img').size(); if(size && window.prd_hover === this) { goods_images_list.find('div:eq(0)').show(); if(size > 1) { window.prd_interval = setInterval($.proxy(function() { if(!$(this).hasClass('active')) { $('.goods_images_list').removeClass('active') .find('div').hide(); window.prd_hover = false; clearInterval(window.prd_interval); return(false); } var next = $(this).find('div:visible').next(); if(!next.length) { next = $(this).find('div:eq(0)'); } $(this).find('div').hide(); next.show(); }, goods_images_list), 1800); } } }, this), 500); }, function(event) { if(this === event.target) return; $('.goods_images_list').removeClass('active').find('div').hide(); window.prd_hover = false; clearInterval(window.prd_interval); }); });
Если этот вариант все же не поможет - попробуем изменить увеличение изображения на клик.