123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- function jcarousel() {
- $('.owl-carousel').owlCarousel({
- margin:40,
- loop:true,
- autoWidth:true,
- items:8,
- nav: true
- });
- }
- function scrollHeader() {
- var $Header = $('header .title');
- $(window).scroll(function() {
- var scroll = $(window).scrollTop();
- if (scroll >= 500) {
- $Header.addClass("Hc");
- } else {
- $Header.removeClass("Hc");
- }
- });
- }
- function open() {
- var $pk = $('.why_lsdo > h3');
- var $answer = $('.why_lsdo ');
- $pk.click(function() {
- if ($('.why_lsdo').hasClass('open')){
- $('.why_lsdo').removeClass('open');
- $('.why_lsdo').addClass('close');
- } else {
- $('.why_lsdo').removeClass('close');
- $('.why_lsdo').addClass('open');
- }
- });
- }
- function scrollbar() {
- $(window).on("load",function(){
- $(".col-12").mCustomScrollbar();
- });
- }
- function scrollNav() {
- $('.navbar a').click(function(){
- //Toggle Class
- $(".active").removeClass("active");
- $(this).closest('li').addClass("active");
- var theClass = $(this).attr("class");
- // $('.'+theClass).parent('li').addClass('active');
- //Animate
- $('html, body').stop().animate({
- scrollTop: $( $(this).attr('href') ).offset().top - 140
- }, 400);
- return false;
- });
- $('.scrollTop a').scrollTop();
- }
- function navFooter() {
- var $Fs = $('footer section');
- $Fs.hide();
- $('footer a[href^="#"]').on('click', function(event) {
- var target = $(this.getAttribute('href'));
- if( target.length ) {
- event.preventDefault();
- target.slideToggle();
- $('html, body').stop().animate({
- scrollTop: target.offset().top
- }, 1000);
- }
- });
- }
- jQuery(document).ready(function($){
- scrollNav();
- scrollHeader();
- jcarousel();
- open();
- scrollbar();
- navFooter();
- });
|