HEX
Server: Apache
System: Linux v38079.2is.nl 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: democfellows (10015)
PHP: 8.1.34
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/creativefellows.nl/test.creativefellows.nl/debets/public/js/app.js
$(document).foundation().ready(function(){

	// open external links in new window
	$(document.links).filter(function() {
	  return this.hostname != window.location.hostname;
	}).attr('target', '_blank');
	
	$("div.lazy").Lazy({
		effect: "fadeIn",
		effectTime : 500,
		enableThrottle: true,
        throttle: 250,
		afterLoad: function(){
			
		}
	});
	
	$(".page-section .cell").each(function(i, el) {
		
		if ($(el).visible(true)) {
			$(el).addClass("already-visible"); 
	  	} 
		
	});
	
	
	$(window).scroll(function(event) {
	
		$(".page-section .cell").each(function(i, el){

			if ($(el).visible(true)) {
				$(el).addClass("come-in"); 
			} 
			
		});
  
	});
	
});


$.fn.visible = function(partial) {
    
      var $t            = $(this),
          $w            = $(window),
          viewTop       = $w.scrollTop()-100,
          viewBottom    = viewTop + $w.height(),
          _top          = $t.offset().top,
          _bottom       = _top + $t.height(),
          compareTop    = partial === true ? _bottom : _top,
          compareBottom = partial === true ? _top : _bottom;
    
    return ((compareBottom <= viewBottom) && (compareTop >= viewTop));

};