script.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. $(document).ready(function() {
  2. // $('#logo').ready(function() {
  3. // var docHeight = $(document).height(),
  4. // docWidth = $(document).width(),
  5. // $div = $('.logo'),
  6. // divWidth = $div.width(),
  7. // divHeight = $div.height(),
  8. // heightMax = docHeight - divHeight,
  9. // widthMax = docWidth - divWidth;
  10. //
  11. // $div.css({
  12. // left: Math.floor( Math.random() * widthMax ),
  13. // top: Math.floor( Math.random() * heightMax )
  14. // });
  15. // });
  16. $('#content .edito').hover(function() {
  17. $(this).animate({right: 0}, 300, 'easeInOutCubic');
  18. }, function(){
  19. $(this).animate({right: -215}, 300, 'easeInSine');
  20. });
  21. // key function
  22. $(document).keydown(function(key) {
  23. switch(parseInt(key.which,10)) {
  24. case 39: // Right
  25. // do something
  26. break;
  27. }
  28. });
  29. // scroll function
  30. $(window).scroll(function() {
  31. if ($(this).scrollTop() >= 0) {
  32. // do something
  33. } else {
  34. // stop
  35. }
  36. });
  37. //Fullpage function
  38. $('#fullpage').fullpage({
  39. anchors: ['firstPage', 'secondPage', '3rdPage'],
  40. scrollOverflow: true,
  41. loopHorizontal: false,
  42. // lazyloading:true
  43. });
  44. });