$('.js-menu-item').click(function(event) {
image = $(this).attr('href');
$mainImg = $('.js-main-image').find('img');
if ($mainImg.attr('src') != image) {
$(".js-gallery-list-link").parent().removeClass('js-selected');
$(this).parent().addClass('js-selected');
$mainImg.animate({
opacity: 0
}, 400, function() {
$mainImg.attr('src', image);
$mainImg.one("load", function() {
$mainImg.animate({
opacity: 1
}, 400);
});
});
}
event.preventDefault();
});
gulp.task('jade', function() {
gulp.src(['./source/**/*.jade', '!./source/partials/*.jade'])
.pipe(jade({
pretty: true
}))
.on('error', console.log)
.pipe(prettify({
indent_char: ' ',
indent_size: 1,
indent_with_tabs: true
}))
.pipe(gulp.dest('./public/'))
.pipe(livereload(server));
});