2020-03-31 20:52:31 +00:00
|
|
|
$(function () {
|
|
|
|
;(function ($, win) {
|
|
|
|
$.fn.inViewport = function (cb) {
|
|
|
|
return this.each(function (i, el) {
|
|
|
|
function visPx() {
|
|
|
|
const H = $(this).height(),
|
|
|
|
r = el.getBoundingClientRect(), t = r.top, b = r.bottom;
|
|
|
|
return cb.call(el, Math.max(0, t > 0 ? H - t : (b < H ? b : H)));
|
|
|
|
}
|
|
|
|
|
|
|
|
visPx();
|
|
|
|
$(win).on("resize scroll", visPx);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}(jQuery, window));
|
|
|
|
|
|
|
|
|
|
|
|
$("#section3").inViewport(function (px) {
|
|
|
|
if (px) {
|
|
|
|
$("#experienceheader").addClass("animationappear600ms");
|
2020-04-01 08:49:45 +00:00
|
|
|
|
2020-04-26 19:05:00 +00:00
|
|
|
const expcontainer = $("#experiencecontentcontainer");
|
|
|
|
expcontainer.addClass("animationappear300ms");
|
|
|
|
expcontainer.addClass("experiencecontaineranimation");
|
2020-03-31 20:52:31 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#section5").inViewport(function (px) {
|
|
|
|
if (px) {
|
|
|
|
$("#contactheader").addClass("animationappear600ms");
|
|
|
|
$("#contactsubheader").addClass("animationappear300ms");
|
|
|
|
$(".personalcontacts").addClass("animationappearnow");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|