application.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. $(document).ready(function(){
  2. $(".object").draggable({
  3. start: function(){
  4. $(".object").css({"z-index": 0});
  5. $(this).css({"z-index": 100});
  6. }
  7. });
  8. $(".thoughtsWindows").draggable({
  9. start: function(){
  10. $(".thoughtsWindows").css({"z-index": 0});
  11. $(this).css({"z-index": 100});
  12. }
  13. });
  14. $(".quotes, #images, .objectTestIndex, #trigger, #trigger2").draggable({
  15. start: function(){
  16. $(".quotes, #images, .objectTestIndex, #trigger").css({"z-index": 0});
  17. $(this).css({"z-index": 100});
  18. }
  19. });
  20. $(".wholeBoxEditable").draggable();
  21. // $(".personnalText").draggable({
  22. // start: function(){
  23. // $(".personnalText").css({"z-index": 0});
  24. // $(this).css({"z-index": 100});
  25. // }
  26. // });
  27. $(".personnalText").draggable()
  28. .click(function() {
  29. $(this).draggable( {disabled: false});
  30. }).dblclick(function() {
  31. $(this).draggable({ disabled: true });
  32. });
  33. function nombre(value){
  34. return Math.floor(Math.random() * value);
  35. }
  36. $(".object").each(function(){
  37. $(this).css({"top": nombre(80) + "%", "left": nombre(90) + "%"});
  38. });
  39. function positionFloating(id){
  40. $(id).css({"top": nombre(70) + "%", "left": nombre(70) + "%"});
  41. }
  42. function floating(id){
  43. setTimeout(function(){
  44. positionFloating(id);
  45. }, 100);
  46. setInterval(function(){
  47. positionFloating(id);
  48. }, 10000);
  49. }
  50. $(".objectCamille, .texteGM").each(function(){
  51. floating($(this));
  52. });
  53. $("#trigger").each(function(){
  54. $(this).css({"top": nombre(80) + "%", "left": nombre(90) + "%"});
  55. });
  56. $("#trigger2").each(function(){
  57. $(this).css({"top": nombre(80) + "%", "left": nombre(90) + "%"});
  58. });
  59. $(".buttonEnter").click(function(){
  60. $(".landingPage").fadeOut(600);
  61. })
  62. $(".objectCamille, .texteGM").each(function(){
  63. $(this).css({"top": nombre(70) + "%", "left": nombre(70) + "%"});
  64. });
  65. $("#Episode01").on("click",function(){
  66. $(".ImgEpisode1").css("display","block")
  67. });
  68. $(".closeButton").on("click",function(){
  69. $(".ImgEpisode1").css("display","none")
  70. });
  71. $("#Episode02").on("click",function(){
  72. $(".ImgEpisode2").css("display","block")
  73. });
  74. $(".closeButton").on("click",function(){
  75. $(".ImgEpisode2").css("display","none")
  76. });
  77. $("#aboutUs").on("click",function(){
  78. $(".hoverAboutUs").css("display","block")
  79. });
  80. $(".closeButton").on("click",function(){
  81. $(".hoverAboutUs").css("display","none")
  82. });
  83. $(".map-pointer").click(function(){
  84. var id = $(this).attr("id");
  85. $(".imgEpisode").hide();
  86. $(".Img"+ id).show();
  87. })
  88. // episodes hover Juli
  89. $("#Episode03").on("click",function(){
  90. $(".ImgEpisode3").css("display","block")
  91. });
  92. $(".closeButton").on("click",function(){
  93. $(".ImgEpisode3").css("display","none")
  94. });
  95. $("#Episode04").on("click",function(){
  96. $(".ImgEpisode4").css("display","block")
  97. });
  98. $(".closeButton").on("click",function(){
  99. $(".ImgEpisode4").css("display","none")
  100. });
  101. $("#Episode05").on("click",function(){
  102. $(".ImgEpisode5").css("display","block")
  103. });
  104. $(".closeButton").on("click",function(){
  105. $(".ImgEpisode5").css("display","none")
  106. });
  107. $("#Episode06").on("click",function(){
  108. $(".ImgEpisode6").css("display","block")
  109. });
  110. $(".closeButton").on("click",function(){
  111. $(".ImgEpisode6").css("display","none")
  112. });
  113. $(".LienEpisode7").on("click",function(){
  114. $(".ImgEpisode7").css("display","block")
  115. });
  116. $(".closeButton").on("click",function(){
  117. $(".ImgEpisode7").css("display","none")
  118. });
  119. $("#Episode001").on("click",function(){
  120. $(".ImgEpisode1").css("display","block")
  121. });
  122. $("#Episode002").on("click",function(){
  123. $(".ImgEpisode2").css("display","block")
  124. });
  125. $("#Episode003").on("click",function(){
  126. $(".ImgEpisode3").css("display","block")
  127. });
  128. $("#Episode004").on("click",function(){
  129. $(".ImgEpisode4").css("display","block")
  130. });
  131. $("#Episode005").on("click",function(){
  132. $(".ImgEpisode5").css("display","block")
  133. });
  134. $("#Episode006").on("click",function(){
  135. $(".ImgEpisode6").css("display","block")
  136. });
  137. });