HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers64/klimroosbudel.nl/wwwroot/public/js/main.js
calculateHeader();

var $slider = $('.slider').children('ul');
$slider.slider({
    loop: 4000
});

$(window).resize(function(){
    calculateHeader();
    $slider.data('slider').adjust();
});


function calculateHeader()
{
    if( $('body').attr('id') != 'photo_gallery')
    {
        var h = $(window).height() - 70 - 170 - 60; // -header - blauwe/rode balk - margin bottom voor pijl
        $('.slider').height(h);
    }
}


function calculateHeader()
{
    var h = $(window).height() - 70 - 170 - 60; // -header - blauwe/rode balk - margin bottom voor pijl
    $('.slider').height(h);
}

var activeWeekFoto = 0;
var weekPos = 0;

$('#slider_week_menu li').each(function(index) {
	$(this).click(function(e){
		e.preventDefault;
		clickActionWeek(index);
	});
});	

function clickActionWeek(newActiveWeekFoto){
		$("#slider_week_menu li").eq(activeWeekFoto).toggleClass("active");
		$("#slider_week_menu li").eq(newActiveWeekFoto).toggleClass("active");
		weekPos = newActiveWeekFoto * -460; 
		$("#activity_slider_week ul").stop().animate({"left": weekPos}, "slow");
		activeWeekFoto = newActiveWeekFoto;
}

var activeMonthFoto = 0;
var monthPos = 0;

$('#slider_month_menu li').each(function(index) {
	$(this).click(function(e){
		e.preventDefault;
		clickActionMonth(index);
	});
});	

function clickActionMonth(newActiveMonthFoto){
		$("#slider_month_menu li").eq(activeMonthFoto).toggleClass("active");
		$("#slider_month_menu li").eq(newActiveMonthFoto).toggleClass("active");
		monthPos = newActiveMonthFoto * -460;
		$("#activity_slider_month ul").stop().animate({"left": monthPos}, "slow");
		activeMonthFoto = newActiveMonthFoto;
}