[text] soyon js

Viewer

copydownloadembedprintName: soyon js
  1. (function ($) {
  2.  
  3.   // stycky navbar
  4.   $(window).on('scroll', function () {
  5.     var scroll = $(window).scrollTop()
  6.     if (scroll > 800) {
  7.       $('.header').addClass('sticky-state');
  8.     } else {
  9.       $('.header').removeClass('sticky-state');
  10.     }
  11.   })
  12.  
  13.   //offcanvas menu
  14.   $(".menu-trigger").click(function () {
  15.     $(".ofcanvas-menu").addClass("active")
  16.   });
  17.  
  18.   $(".menu-close").click(function () {
  19.     $(".ofcanvas-menu").removeClass("active")
  20.   });
  21.  
  22.   //about collapse active js
  23.   $(".option-heading").click(function () {
  24.     $(this).parent().toggleClass("active");
  25.     $(this).toggleClass("active");
  26.   });
  27.  
  28.  
  29.   $(".option-heading").click(function () {
  30.     $(this).parent().toggleClass("active");
  31.     $(this).toggleClass("active");
  32.   });
  33.  
  34.  
  35.   //Toggle Sections On Home
  36.   $(".toggle-page").click(function () {
  37.     $(".toggle-page").parents('.parent-wrapper').removeClass('active');
  38.       $(this).parents('.parent-wrapper').addClass('active');
  39.     
  40.   });
  41.  
  42.   //Menu Section On Home
  43.   $(".ofcanvas-menu-items li").click(function () {
  44.     debugger
  45.     $(".ofcanvas-menu-items li").removeClass('active');
  46.     $(".menu-left").find('.active').removeClass('active');
  47.       $(this).addClass('active');
  48.       //$(".ofcanvas-menu-items li.active").data("target").addClass("d-md-block");
  49.       $($(".ofcanvas-menu-items li.active").data("target")).addClass("d-md-block active");
  50.       $(".ofcanvas-menu").removeClass('active');
  51.   });
  52.  
  53.  
  54.   $(".ofcanvas-menu-items li").hover(
  55.  
  56.     function() {
  57.       $(".menu-left").find('.d-md-block').removeClass('d-md-block');
  58.       $($(this).data("target")).addClass("d-md-block");
  59.     }, function() {
  60.       $($(this).data("target")).removeClass("d-md-block");
  61.       $(".menu-left").find('.active').addClass('d-md-block');
  62.     }
  63.   );
  64.  
  65.   // section h1 hover
  66.   // $(".about p").hide();
  67.   // $(".contact p").hide();
  68.   // $(".bond p").hide();
  69.   // $(".baristo p").hide();
  70.   // $(".lumi p").hide();
  71.   // $(".ninety-nine p").hide();
  72.   // $(".gamuda p").hide();
  73.   // $(".hash p").hide();
  74.  
  75.   // $(".about h1").hover(function () {
  76.   //   $(".about p").toggle('slow');
  77.   // });
  78.   // $(".contact h1").hover(function () {
  79.   //   $(".contact P").toggle('slow');
  80.   // });
  81.   // $(".bond h1").hover(function () {
  82.   //   $(".bond P").toggle('slow');
  83.   // });
  84.   // $(".baristo h1").hover(function () {
  85.   //   $(".baristo p").toggle('slow');
  86.   // });
  87.   // $(".lumi h1").hover(function () {
  88.   //   $(".lumi p").toggle('slow');
  89.   // });
  90.   // $(".ninety-nine h1").hover(function () {
  91.   //   $(".ninety-nine p").toggle('slow');
  92.   // });
  93.   // $(".gamuda h1").hover(function () {
  94.   //   $(".gamuda p").toggle('slow');
  95.   // });
  96.   // $(".hash h1").hover(function () {
  97.   //   $(".hash p").toggle('slow');
  98.   // });
  99.  
  100.  
  101.   //section linking
  102.   // $(".gamuda").click(function () {
  103.   //   window.location = $(this).find("a").attr("href");
  104.   //   return false;
  105.   // });
  106.   // $(".ninety-nine").click(function () {
  107.   //   window.location = $(this).find("a").attr("href");
  108.   //   return false;
  109.   // });
  110.   // $(".contact").click(function () {
  111.   //   window.location = $(this).find("a").attr("href");
  112.   //   return false;
  113.   // });
  114.   // $(".bond").click(function () {
  115.   //   window.location = $(this).find("a").attr("href");
  116.   //   return false;
  117.   // });
  118.   // $(".baristo").click(function () {
  119.   //   window.location = $(this).find("a").attr("href");
  120.   //   return false;
  121.   // });
  122.   // $(".lumi").click(function () {
  123.   //   window.location = $(this).find("a").attr("href");
  124.   //   return false;
  125.   // });
  126.   // $(".about").click(function () {
  127.   //   window.location = $(this).find("a").attr("href");
  128.   //   return false;
  129.   // });
  130.   // $(".hash").click(function () {
  131.   //   window.location = $(this).find("a").attr("href");
  132.   //   return false;
  133.   // });
  134.  
  135.   //owl carosel
  136.   $('.owl-carousel').owlCarousel({
  137.     center: true,
  138.     loop: true,
  139.     margin: 10,
  140.     autoplay: true,
  141.     autoplayTimeout: 1000,
  142.     autoplayHoverPause: true,
  143.     responsive: {
  144.       0: {
  145.         items: 3
  146.       },
  147.       480: {
  148.         items: 4
  149.       },
  150.       576: {
  151.         items: 5
  152.       },
  153.       768: {
  154.         items: 6
  155.       },
  156.       992: {
  157.         items: 7
  158.       },
  159.       1200: {
  160.         items: 8
  161.       }
  162.     }
  163.   });
  164.  
  165.   //infinity loop
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172. })(jQuery);

Editor

You can edit this paste and save as new:


File Description
  • soyon js
  • Paste Code
  • 29 Oct-2020
  • 4.28 Kb
You can Share it: