$(window).scroll(function() {
if ($(window).scrollTop() > 1 && $(window).scrollTop() < 815){
$('html,body').stop().animate({ 'scrollTop': 815 }, 'fast');
});
});
var fileinclude = require('gulp-file-include');
gulp.task('html', function() {
gulp.src(path.assets.html)
.pipe(fileinclude({
prefix: '@@',
basepath: '@file'
}))
.pipe(gulp.dest(path.build.html))
});
@@include('./components/meta.html', {
"title": "Main",
"viewport": "width=device-width, initial-scale=1"
})
var timeout, last_index = 1;
function timer(index)
{
last_index = index;
timeout = setTimeout(function(){
/*
код который нужно выполнять
*/
index += 1;
if (index <= 4) timer(index);
}, 2000)
}
timer(1);
$('.slider').on('mouseenter', function(){
clearTimeout(timeout);
});
$('.slider').on('mouseleave', function(){
timer(last_index);
});