testimonial.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*-------------------------------------------------
  2. Project: Multifly
  3. Author: Webstrot
  4. Copyright © 2019-20
  5. ----------------------------------------------------*/
  6. $(window).on("load", function() {
  7. setTimeout(function() {
  8. function n() {
  9. S.animate({
  10. d: "M1010.1,64C1137.4,64,1350,0,1350,0H0C0,0,839.3,64,1010.1,64z"
  11. }, 8e3, mina.easeinout, o)
  12. }
  13. function o() {
  14. S.animate({
  15. d: "M287,64C414.3,64,1350,0,1350,0H0C0,0,116.2,64,287,64z"
  16. }, 8e3, mina.easeinout, n)
  17. }
  18. function a() {
  19. y.animate({
  20. d: "M1076.6,118.4C1247.4,118.4,1350,0.2,1350,0.2H0C0,0.2,908.6,118.4,1076.6,118.4z"
  21. }, 12e3, mina.easeinout, i)
  22. }
  23. function i() {
  24. y.animate({
  25. d: "M307.1,118.4C477.8,118.4,1350,0.2,1350,0.2H0C0,0.2,139.5,118.4,307.1,118.4z"
  26. }, 12e3, mina.easeinout, a)
  27. }
  28. function c() {
  29. M.animate({
  30. d: "M317.9,76C467,76,1350,0.2,1350,0.2H0C0,0.2,1,76,317.9,76z"
  31. }, 9e3, mina.easeinout, d)
  32. }
  33. function d() {
  34. M.animate({
  35. d: "M954,76c149,0,396-75.8,396-75.8H0C0,0.2,637,76,954,76z"
  36. }, 9e3, mina.easeinout, c)
  37. }
  38. function l() {
  39. z.animate({
  40. d: "M474,67c168,0,876-66.8,876-66.8H0C0,0.2,168.1,67,474,67z"
  41. }, 11e3, mina.easeinout, r)
  42. }
  43. function r() {
  44. z.animate({
  45. d: "M904,67c168,0,446-66.8,446-66.8H0C0,0.2,598.2,67,904,67z"
  46. }, 11e3, mina.easeinout, l)
  47. }
  48. function u() {
  49. H.animate({
  50. d: "M327,38C478.3,38,1350,0.1,1350,0.1H0C0,0.1,0,38,327,38z"
  51. }, 14e3, mina.easeinout, m)
  52. }
  53. function m() {
  54. H.animate({
  55. d: "M857,38c151.3,0,493-37.9,493-37.9H0C0,0.1,530,38,857,38z"
  56. }, 14e3, mina.easeinout, u)
  57. }
  58. function C() {
  59. L.animate({
  60. d: "M1175,103c169,0,175-102.9,175-102.9H0C0,0.1,1007,103,1175,103z"
  61. }, 8e3, mina.easeinout, p)
  62. }
  63. function p() {
  64. L.animate({
  65. d: "M688,103c169,0,662-102.9,662-102.9H0C0,0.1,520,103,688,103z"
  66. }, 8e3, mina.easeinout, C)
  67. }
  68. $window = $(window);
  69. var f = $window.height() / 2,
  70. h = $("#container-general"),
  71. g = $("#section-quote").offset().top - f
  72. $(document).on('click','#section-quote .container-pe-quote .pp-quote',function() {
  73. var e = $(this).data("textquote");
  74. $("#section-quote .container-pe-quote .pp-quote").removeClass("active"),
  75. $(this).addClass("active"), $("#section-quote .container-quote").removeClass("carousel-on"),
  76. $("#section-quote .container-quote .quote.show").removeClass("show").addClass("hide-bottom"),
  77. $("." + e).removeClass("hide-bottom hide-top").addClass("show")
  78. })
  79. }, 150);
  80. setInterval(function () {
  81. var maxVal= $("#section-quote .container-pe-quote .pp-quote").length;
  82. var randomVal = Math.floor((Math.random() * maxVal)+1);
  83. var count = 1;
  84. $('.pp-quote').each( function(){
  85. var obj = $(this);
  86. if(count==randomVal){
  87. var dataRR = obj.attr('data-textquote');
  88. $(".pp-quote[data-textquote="+dataRR+"]").click();
  89. }
  90. count++;
  91. });
  92. },4000);
  93. });