flask website for la petite ecole
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

46 lines
1.3 KiB

$(document).ready(function(){
if ($('#homeSpacer')){
$('#content').css({height:'0',overflow:'hidden'});
$('#homeSpacer').click(function(){
$(this).css('height','0');
$('#content').css({height:'auto',overflow:'auto'});
$('nav').css('z-index','1000');
$("body").css('overflow','auto');
});
}
function getRndInteger(min, max) {
return Math.floor(Math.random() * (max - min + 1) ) + min;
}
var sun_x = getRndInteger(0, 850);
var sun_y = getRndInteger(0, 550);
var shape_x = getRndInteger(-1500, 200);
var shape_y = getRndInteger(0, 500);
$('.picto_sun').css({top:sun_y , left:sun_x,});
$('.picto_shape').css({top:shape_y , left:shape_x,});
$('#topBtn').click(function(){
$('.menuItem').toggleClass('open')
});
$('.menuItem').click(function(){
$('.menuItem').removeClass('active');
$('.menuItem').toggleClass('open');
$(this).addClass('active');
});
$(document).scroll(function() {
var dtop = $(document).scrollTop();
var maxH = $(document).height();
var windowh = $(window).height();
var ratio = maxH / windowh;
var topval = dtop+(dtop/ratio)+140;
$('#logo').css('top',topval );
})
})