Files
2018-03-22 12:38:42 +01:00

53 lines
1.3 KiB
JavaScript

$(document).ready(function() {
// $('#logo').ready(function() {
// var docHeight = $(document).height(),
// docWidth = $(document).width(),
// $div = $('.logo'),
// divWidth = $div.width(),
// divHeight = $div.height(),
// heightMax = docHeight - divHeight,
// widthMax = docWidth - divWidth;
//
// $div.css({
// left: Math.floor( Math.random() * widthMax ),
// top: Math.floor( Math.random() * heightMax )
// });
// });
$('#content .edito').hover(function() {
$(this).animate({right: 0}, 300, 'easeInOutCubic');
}, function(){
$(this).animate({right: -215}, 300, 'easeInSine');
});
// key function
$(document).keydown(function(key) {
switch(parseInt(key.which,10)) {
case 39: // Right
// do something
break;
}
});
// scroll function
$(window).scroll(function() {
if ($(this).scrollTop() >= 0) {
// do something
} else {
// stop
}
});
//Fullpage function
$('#fullpage').fullpage({
anchors: ['firstPage', 'secondPage', '3rdPage'],
scrollOverflow: true,
loopHorizontal: false,
// lazyloading:true
});
});