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/marie.creativefellows.nl/public/js/app-min.js
$(document).foundation().ready(function(){
			
	$(".lazy-image, .lazy-load-image").Lazy({
		effect: "fadeIn",
		effectTime : 500,
		enableThrottle: true,
        throttle: 250,
		afterLoad: function(el){
			//console.log( el );
		//	el.parent().addClass("apics-shape__visible");
		}
	});
	
	
	
	// cookie accept
	$('#acceptCookie').on("click",function(event)
	{
		event.preventDefault();

		var link = $(this).attr("data-link")
		$.ajax({
			type: 'POST',
			url: link,
			complete: function(){
				$("#accept-cookies").slideUp("fast");	
			}	
		});
	});

	//.jarallax, 
	//$(".page-section__no-padding .column-wrapper").jarallax();
	
	$(".jarallax, .page-section__parallax-image .column-wrapper").jarallax();
	
//	$(".jarallax__full-width").fadeScroll();
	
	
//	$(".page-section__lead-text").attr("data-midnight","green");
//	$('#header').midnight();
	
});


$.fn.fadeScroll = function(){
	
	return this.each(function(){

		var plugin	= $(this);
		
		
		plugin.settings = {
			fadeout: 0,
			fadeclass : 'jarallax__fadeout'
		}

		plugin.init = function()
		{
			$(window).scroll(function() {
				var scroll = plugin.getCurrentScroll();
				
				var div = plugin.height() - 200;
				
				if( scroll >= div )
				{
					plugin.addClass( plugin.settings.fadeclass );
				}
				else
				{
					plugin.removeClass( plugin.settings.fadeclass );
				}
			});
			
			//plugin.checkScrollPosition();
		}
		
		plugin.getCurrentScroll = function()
		{
	    	return window.pageYOffset;
	    }
	
		plugin.checkScrollPosition = function()
		{
			var scroll = plugin.getCurrentScroll();
			if(scroll >= plugin.settings.fadeout)
			{
				plugin.addClass( plugin.settings.fadeclass );
			
			}
		}
	
		
	
	
		
		// init the plugin
	    plugin.init();
		
		
	});
}

$.fn.visible = function(partial) {

      var $t            = $(this),
          $w            = $(window),
          viewTop       = $w.scrollTop(),
          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));

  };