var a = 1;
function hideImages1() {
$('div.first-product-cart > div.img > img').not('.slider-active').css('display', 'none');
$('div.first-product-cart div.box-item div.spinner-wrap').not('.spinner-active').css('display', 'none');
}
hideImages1();
$("div.first-product-cart .next-button").click(function() {
a++;
if (a < 7) {
$('div.first-product-cart > div.img > img.slider-active').fadeOut(function() {
$(this).next().fadeIn().addClass('slider-active');
$(this).removeClass('slider-active');
});
$('div.first-product-cart div.box-item div.spinner-active').fadeOut(function() {
$(this).next().fadeIn().addClass('spinner-active');
$(this).removeClass('spinner-active');
});
} else {
a--;
}
console.log(a);
});
$("div.first-product-cart .prev-button").click(function() {
a--;
if (a > 0) {
$('div.first-product-cart > div.img > img.slider-active').fadeOut(function() {
$(this).prev().fadeIn().addClass('slider-active');
$(this).removeClass('slider-active');
});
$('div.first-product-cart div.box-item div.spinner-active').fadeOut(function() {
$(this).prev().fadeIn().addClass('spinner-active');
$(this).removeClass('spinner-active');
});
} else {
a++;
}
console.log(a);
});
//= template/header.html
span {
opacity: 0;
@include transition(0.6s opacity);
width: 100%;
height: 100%;
font: $font_regular;
color: $white;
display: block;
text-align: center;
padding: 40% 0 0;
&:hover {
background: rgba(0,0,0,0.8);
opacity: 1;
@include transition(0.6s opacity);
}
}
<div class="container">
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4"></div>
<div class="col-sm-4">
<div class="row">
<div class="col-sm-12"></div>
<div class="col-sm-12"></div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="row">
<div class="col-xs-6"></div>
<div class="col-xs-6"></div>
</div>
</div>
<div class="col-xs-12">
<div class="row">
<div class="col-xs-6"></div>
<div class="col-xs-6"></div>
</div>
</div>
</div>
</div>
// ~ Compile JS ~
var jsFilter = gulpFilter('**/*.js');
// Concat vendor JS (uglify for production)
gulp.task('js:vendor', function() {
gulp.src(mainBowerFiles({
"overrides": {
"jquery": {
"main": "./dist/jquery.min.js"
},
"bootstrap": {
"main": "./dist/js/bootstrap.min.js"
},
"magnific-popup": {
"main": "./dist/jquery.magnific-popup.min.js"
}
}
}))
.pipe(jsFilter)
.pipe(concat('vendor.js'))
.pipe(gulpIf(env !== 'dev', uglify()))
.pipe(gulp.dest(outputDir + 'js'))
});
// Concat own JS (uglify for production)
gulp.task('js', function() {
gulp.src(src.js)
.pipe(jsHint())
.pipe(jsHint.reporter('default'))
.pipe(concat('script.js'))
.pipe(gulpIf(env !== 'dev', uglify()))
.pipe(gulp.dest(outputDir + 'js'))
.pipe(connect.reload());
});
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="row">
<div class="col-sm-12">
<div class="block1"></div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="block2"></div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="row">
<div class="col-sm-12">
<div class="block3"></div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="block4"></div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="block5"></div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="row">
<div class="col-sm-12">
<div class="block6"></div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="block7"></div>
</div>
</div>
</div>
</div>
</div>