File: D:/HostingSpaces/SBogers10/ridderstee.komma.pro/wwwroot/js/animations.js
/**
* Created by Pascal on 09/08/17.
*/
$(function () {
// Detect if fracs function are init
if (typeof $.fracs === "undefined") rebindFracs();
$('.fracs-animation').fracs(function (fracs) {
var viewPort = $(window).height();
if(fracs.visible > 0){
// Get the percentage of how far the object is till top of viewport
var scrolledAmount = 1 - fracs.rects.viewport.top/viewPort;
if(scrolledAmount >= 0.4) $(this).removeClass('fracamation');
}
else{
$(this).addClass('fracamation');
}
});
// Initial Fracs on styling
$('.fracs-animation').fracs('check');
});