Optimize images & stuff

This commit is contained in:
Edin Dazdarevic
2017-10-06 15:00:59 +02:00
parent 8f44e80ec7
commit f4927f9c8a
81 changed files with 561 additions and 858 deletions

View File

@@ -186,119 +186,119 @@ $(window).on("scroll", function() {
$(document).ready(function() {
var fadeStart = 900;
var fadeUntil = 1300;
// $(document).ready(function() {
// var fadeStart = 900;
// var fadeUntil = 1300;
$(window).scroll(function() {
var offset = $(document).scrollTop();
// $(window).scroll(function() {
// var offset = $(document).scrollTop();
if (offset < fadeStart) {
$(".brush").css('left', "25");
$(".brush-shadow").css('left', "25");
// if (offset < fadeStart) {
// $(".brush").css('left', "25");
// $(".brush-shadow").css('left', "25");
} else if (offset >= fadeStart && offset <= fadeUntil) {
$(".brush").animate({
left: "75",
}, 3000, function() {});
$(".brush-shadow").animate({
left: "55",
}, 4000, function() {});
// } else if (offset >= fadeStart && offset <= fadeUntil) {
// $(".brush").animate({
// left: "75",
// }, 3000, function() {});
// $(".brush-shadow").animate({
// left: "55",
// }, 4000, function() {});
} else if (offset > fadeUntil) {
$(".brush").css('left', "75");
$(".brush-shadow").css('left', "55");
// } else if (offset > fadeUntil) {
// $(".brush").css('left', "75");
// $(".brush-shadow").css('left', "55");
}
// }
});
});
// });
// });
$(document).ready(function() {
var fadeStart1 = 1400;
var fadeUntil1 = 2000;
// $(document).ready(function() {
// var fadeStart1 = 1400;
// var fadeUntil1 = 2000;
$(window).scroll(function() {
var offset1 = $(document).scrollTop();
// $(window).scroll(function() {
// var offset1 = $(document).scrollTop();
if (offset1 < fadeStart1) {
$(".box-img").css('right', "20");
$(".box-img-shadow").css('right', "20");
// if (offset1 < fadeStart1) {
// $(".box-img").css('right', "20");
// $(".box-img-shadow").css('right', "20");
} else if (offset1 >= fadeStart1 && offset1 <= fadeUntil1) {
$(".box-img").animate({
right: "150",
}, 3000, function() {});
$(".box-img-shadow").animate({
right: "130",
}, 3500, function() {});
// } else if (offset1 >= fadeStart1 && offset1 <= fadeUntil1) {
// $(".box-img").animate({
// right: "150",
// }, 3000, function() {});
// $(".box-img-shadow").animate({
// right: "130",
// }, 3500, function() {});
} else if (offset1 > fadeUntil1) {
$(".box-img").css('right', "150");
$(".box-img-shadow").css('right', "130");
// } else if (offset1 > fadeUntil1) {
// $(".box-img").css('right', "150");
// $(".box-img-shadow").css('right', "130");
}
// }
});
});
// });
// });
$(document).ready(function() {
if ($(window).width() < 767) {
return
}
var fadeStart2 = 2300;
var fadeUntil2 = 2700;
// $(document).ready(function() {
// if ($(window).width() < 767) {
// return
// }
// var fadeStart2 = 2300;
// var fadeUntil2 = 2700;
$(window).scroll(function() {
var offset2 = $(document).scrollTop();
// $(window).scroll(function() {
// var offset2 = $(document).scrollTop();
if (offset2 < fadeStart2) {
$(".hand").css({
'left': '50',
'top': '130'
});
$(".hand-shadow").css({
'left': '50',
'top': '130'
});
// if (offset2 < fadeStart2) {
// $(".hand").css({
// 'left': '50',
// 'top': '130'
// });
// $(".hand-shadow").css({
// 'left': '50',
// 'top': '130'
// });
} else if (offset2 >= fadeStart2 && offset2 <= fadeUntil2) {
$(".hand").animate({
left: "70",
top: "150",
}, 3000, function() {});
$(".hand-shadow").animate({
left: "60",
top: "140",
}, 3500, function() {});
// } else if (offset2 >= fadeStart2 && offset2 <= fadeUntil2) {
// $(".hand").animate({
// left: "70",
// top: "150",
// }, 3000, function() {});
// $(".hand-shadow").animate({
// left: "60",
// top: "140",
// }, 3500, function() {});
} else if (offset2 > fadeUntil2) {
$(".hand").css({
'left': '70',
'top': '150'
});
$(".hand-shadow").css({
'left': '60',
'top': '140'
});
// } else if (offset2 > fadeUntil2) {
// $(".hand").css({
// 'left': '70',
// 'top': '150'
// });
// $(".hand-shadow").css({
// 'left': '60',
// 'top': '140'
// });
}
// }
});
});
// });
// });
/*======================For Mobile Animation=======================*/
// if ($(window).width() < 767) {