Слайдер В Каталоге
#1
Отправлено 20 Ноябрь 2013 - 16:50
#2
Отправлено 20 Ноябрь 2013 - 21:59
#3
Отправлено 21 Ноябрь 2013 - 02:54
#4
Отправлено 21 Ноябрь 2013 - 03:09
Сake (21 Ноябрь 2013 - 02:54) писал:
#5
Отправлено 22 Ноябрь 2013 - 03:02
<img src="{goods.images.LARGE}" alt="{goods.images.NAME}" />
на
<img src="{goods.images.IMAGE_SMALL}" alt="{goods.images.NAME}" />
Как выполните данное изменение - сообщите.
#6
Отправлено 22 Ноябрь 2013 - 09:20
#7
Отправлено 22 Ноябрь 2013 - 17:17
#8
Отправлено 23 Ноябрь 2013 - 01:14
$(function() { $('.prd-image a img').live('mouseenter', function () { $(this).data('hover', true).parent().removeAttr('title'); setTimeout($.proxy(function() { var goods_images_list = $(this).closest('.prd-image').find('.goods_images_list'); var offset = goods_images_list.width() + goods_images_list.children('div').width() + goods_images_list.offset().left; if($(window).width() < offset) { goods_images_list.addClass('view-right'); } var size = goods_images_list.find('img').size(); if(size && $(this).data('hover')) { goods_images_list.find('div:eq(0)').show(); if(size > 1) { goods_images_list.data('interval', setInterval($.proxy(function() { 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), 1500)); } } }, this), 500); }); $('.prd-image a img').live('mouseleave', function () { var goods_images_list = $(this).closest('.prd-image').find('.goods_images_list'); goods_images_list.find('div').hide(); $(this).removeData('hover'); if(goods_images_list.data('interval')) { clearInterval(goods_images_list.data('interval')); goods_images_list.removeData('interval'); } }); });
так как данный код попросту мешает при отладке. Как удалите данный код - сообщите.
#9
Отправлено 23 Ноябрь 2013 - 01:36
Сake (23 Ноябрь 2013 - 01:14) писал:
$(function() { $('.prd-image a img').live('mouseenter', function () { $(this).data('hover', true).parent().removeAttr('title'); setTimeout($.proxy(function() { var goods_images_list = $(this).closest('.prd-image').find('.goods_images_list'); var offset = goods_images_list.width() + goods_images_list.children('div').width() + goods_images_list.offset().left; if($(window).width() < offset) { goods_images_list.addClass('view-right'); } var size = goods_images_list.find('img').size(); if(size && $(this).data('hover')) { goods_images_list.find('div:eq(0)').show(); if(size > 1) { goods_images_list.data('interval', setInterval($.proxy(function() { 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), 1500)); } } }, this), 500); }); $('.prd-image a img').live('mouseleave', function () { var goods_images_list = $(this).closest('.prd-image').find('.goods_images_list'); goods_images_list.find('div').hide(); $(this).removeData('hover'); if(goods_images_list.data('interval')) { clearInterval(goods_images_list.data('interval')); goods_images_list.removeData('interval'); } }); });
так как данный код попросту мешает при отладке. Как удалите данный код - сообщите.
#10
Отправлено 23 Ноябрь 2013 - 02:59
.goodsListItemImage { height: 100px; margin-top: 1em; }
и замените на
.goodsListItemImage { height: 150px; margin-top: 1em; overflow: hidden; position: relative; }
далее добавьте
.goodsListItemBlockSlidePrev, .goodsListItemBlockSlideNext { background: #FFFFFF; border: 1px solid; border-radius: 0 20px 20px 0; content: "12"; cursor: pointer; font-size: 20px; font-weight: bold; height: 40px; left: 0; line-height: 40px; margin-top: -20px; padding-left: 2px; position: absolute; text-align: left; top: 50%; width: 24px; display: none; } .goodsListItemBlockSlideNext { border-radius: 20px 0 0 20px; left: inherit; right: 0; } .goodsListItemImage:hover .goodsListItemBlockSlidePrev, .goodsListItemImage:hover .goodsListItemBlockSlideNext { display: block; }
далее в шаблоне "Товары" найдите и удалите множественные переносы
<br><br><br><br>
после в файл main.js добавьте
function goodsListItemBlockSlide() { $('.goodsListItemBlock .goodsListItemImage:not(.slide)').each(function() { var image = $(this).find('.goods_images_list > div:eq(0)') .addClass('active').find('img').attr('src'); $(this).find('.prd-image > a img').attr('src', image); $(this).addClass('slide') .append($('<div class="goodsListItemBlockSlidePrev">').html('◄') .click(function() { var active = $(this).parent().find('.goods_images_list > div.active').removeClass('active'); if(active.prev().length) { var slide = active.prev().addClass('active').find('img'); $(this).parent().find('.prd-image > a img').attr('src', slide.attr('src')); } else { var slide = $(this).parent().find('.goods_images_list > div:last').addClass('active').find('img'); $(this).parent().find('.prd-image > a img').attr('src', slide.attr('src')); } })) .append($('<div class="goodsListItemBlockSlideNext">').html('►') .click(function() { var active = $(this).parent().find('.goods_images_list > div.active').removeClass('active'); if(active.next().length) { var slide = active.next().addClass('active').find('img'); $(this).parent().find('.prd-image > a img').attr('src', slide.attr('src')); } else { var slide = $(this).parent().find('.goods_images_list > div:first').addClass('active').find('img'); $(this).parent().find('.prd-image > a img').attr('src', slide.attr('src')); } })); }); } $(function() { if($('.goodsListItemBlock .goods_images_list img').length) { goodsListItemBlockSlide(); } });
#11
Отправлено 23 Ноябрь 2013 - 05:23
#12
Отправлено 23 Ноябрь 2013 - 05:30
Попробовал это
document.body.onmousedown = function() {return false};но не помогло...
#13
Отправлено 24 Ноябрь 2013 - 13:35
#14
Отправлено 26 Ноябрь 2013 - 04:55
.goodsListItemBlockSlideNext::selection { background: transparent; } .goodsListItemBlockSlideNext::-moz-selection { background: transparent; }
далее в файле main.js найдите
$(nav).html($(html).find(nav).first().html());
и замените на
$(nav).html($(html).find(nav).first().html()); goodsListItemBlockSlide();
#15
Отправлено 26 Ноябрь 2013 - 05:37
#16
Отправлено 27 Ноябрь 2013 - 02:45
.goodsListItemBlockSlidePrev::selection { background: transparent; } .goodsListItemBlockSlidePrev::-moz-selection { background: transparent; }
#17
Отправлено 27 Ноябрь 2013 - 10:09
#18
Отправлено 28 Ноябрь 2013 - 05:01
Количество пользователей, читающих эту тему: 0
0 пользователей, 0 гостей, 0 анонимных