// Слайдер внутри отзывов
$('.review-slide').each(function(index){
$(this).addClass('review-slide-' + index);
var indexClass = '.review-slide-' + index;
$(indexClass + ' .review-inner-slider').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
asNavFor: indexClass + ' .review-inner-slider-thumb',
});
$(indexClass + ' .review-inner-slider-thumb').slick({
arrows: false,
slidesToShow: 3,
slidesToScroll: 1,
asNavFor: indexClass + ' .review-inner-slider',
dots: false,
focusOnSelect: true,
});
});
<div class="main">
<div>
<?php $query = new WP_Query('cat=8'); ?>
<?php if ( $query->have_posts() ) : ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="panel">
<div class="panel-heading">
<a href="#1"><i class="fa fa-trophy"></i><?php the_title() ?></a>
</div>
<div class="panel-collapse">
<?php the_excerpt() ?>
<div class="button"><a href="<?php the_permalink() ?>">Read more</a></div>
</div>
</div>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
</div>
</div>
@keyframes fadeInUpSD {
0% {
opacity: 0;
transform: translate3d(0,15%,0)
}
100% {
opacity: 1;
transform: translate3d(0,0,0)
}
}
.hero-slider .slick-active .hero-title.ajat-animated {
animation: fadeInUpSD 1s both 1s
}
.hero-slider .slick-active .hero-list.ajat-animated {
animation: fadeInUpSD 1s both 1.5s
}
.page-header {
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 20px 0;
background-color: #292929;
transition: padding .25s;
z-index: 100;
}
.page-header.scroll {
padding: 10px 0;
background-color: #fff;
box-shadow: 0 5px 15px rgba(0,0,0,.05);
}
.page-header.scroll .main-menu a {
color: #292929;
}
.page-header.scroll .main-menu a:hover {
color: #06bbc7;
}
.main-menu a {
color: #e5e5e5;
}
.main-menu a:hover {
color: #06bbc7;
}
.slider-wrapper {
margin-left: calc(50% - 1200px/2);
padding-left: 15px;
padding-right: 15px;
}
.slick-list {
padding-right: 10%;
}
var $pagingInfo = $('.paging-info');
var $heroSlider = $('.hero-slider');
$heroSlider.on('init reInit afterChange', function(event, slick, currentSlide, nextSlide){
var i = (currentSlide ? currentSlide : 0) + 1;
var prefix = i < 10 ? '0' : '';
var prefixAll = slick.slideCount < 10 ? '0' : '';
$pagingInfo.html('<span class="current">' + prefix + i + '</span>' + '/' + prefixAll + slick.slideCount);
});