|
|
|
|
@ -4031,67 +4031,10 @@ function placeInput(width){ |
|
|
|
|
var $reSwipeWrap = $reContainer.children('ul'); |
|
|
|
|
var $reSwipeItems = $reSwipeWrap.children('li'); |
|
|
|
|
var $reControls = $reContainer.children('div.re-controls'); |
|
|
|
|
var $recPrev = $reControls.children('a.prev'); |
|
|
|
|
var $recNext = $reControls.children('a.next'); |
|
|
|
|
|
|
|
|
|
if ($reSwipeItems.length > 1) { |
|
|
|
|
$reControls.addClass('enabled'); |
|
|
|
|
$reSwipeItems.css({ |
|
|
|
|
display: 'block' |
|
|
|
|
}); |
|
|
|
|
$reContainer.height($reSwipeItems.eq(0).height()); |
|
|
|
|
var $reSwiper = $reContainer.swiper({ |
|
|
|
|
speed: 500, |
|
|
|
|
mode:'horizontal', |
|
|
|
|
loop: false, |
|
|
|
|
simulateTouch: false, |
|
|
|
|
autoplay:4200, |
|
|
|
|
onInit: function () { |
|
|
|
|
$recPrev.addClass('disabled'); |
|
|
|
|
}, |
|
|
|
|
onSlideChangeStart: function (swiper) { |
|
|
|
|
$reContainer.animate({ |
|
|
|
|
height: $reSwipeItems.eq(swiper.activeIndex).children('div.re-body').height() |
|
|
|
|
}, 300); |
|
|
|
|
if (swiper.activeIndex == 0) { |
|
|
|
|
if (!$recPrev.hasClass('disabled')) { |
|
|
|
|
$recPrev.addClass('disabled'); |
|
|
|
|
} |
|
|
|
|
if ($recNext.hasClass('disabled')) { |
|
|
|
|
$recNext.removeClass('disabled'); |
|
|
|
|
} |
|
|
|
|
} else if (swiper.activeIndex == swiper.slides.length-1) { |
|
|
|
|
if (!$recNext.hasClass('disabled')) { |
|
|
|
|
$recNext.addClass('disabled'); |
|
|
|
|
} |
|
|
|
|
if ($recPrev.hasClass('disabled')) { |
|
|
|
|
$recPrev.removeClass('disabled'); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if ($recPrev.hasClass('disabled')) { |
|
|
|
|
$recPrev.removeClass('disabled'); |
|
|
|
|
} |
|
|
|
|
if ($recNext.hasClass('disabled')) { |
|
|
|
|
$recNext.removeClass('disabled'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$recPrev.on('click', function () { |
|
|
|
|
if (!$(this).hasClass('disabled')) { |
|
|
|
|
$reSwiper.swipePrev(); |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
$recNext.on('click', function () { |
|
|
|
|
if (!$(this).hasClass('disabled')) { |
|
|
|
|
$reSwiper.swipeNext(); |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$('#mp-photo-gallery').each(function () { |
|
|
|
|
|