| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 | // Custom Scripts for Primal Template //jQuery(function($) {    "use strict";        // get the value of the bottom of the #main element by adding the offset of that element plus its height, set it as a variable        var mainbottom = $('#main').offset().top;        // on scroll,        $(window).on('scroll',function(){        // we round here to reduce a little workload        stop = Math.round($(window).scrollTop());        if (stop > mainbottom) {            $('.navbar').addClass('past-main');            $('.navbar').addClass('effect-main')        } else {            $('.navbar').removeClass('past-main');       }      });  // Collapse navbar on click   $(document).on('click.nav','.navbar-collapse.in',function(e) {    if( $(e.target).is('a') ) {    $(this).removeClass('in').addClass('collapse');   }  });  /*-----------------------------------  ----------- Scroll To Top -----------  ------------------------------------*/    $(window).scroll(function () {      if ($(this).scrollTop() > 1000) {          $('#back-top').fadeIn();      } else {          $('#back-top').fadeOut();      }    });    // scroll body to 0px on click    $('#back-top').on('click', function () {      $('#back-top').tooltip('hide');      $('body,html').animate({          scrollTop: 0      }, 1500);      return false;    });  /*-------- Owl Carousel ---------- */    $(".reviews").owlCarousel({    slideSpeed : 200,    items: 1,    singleItem: true,    autoPlay : true,    pagination : false    });  /*-------- Owl Carousel ---------- */    $(".review-cards").owlCarousel({    slideSpeed : 200,    items: 1,    singleItem: true,    autoPlay : true,    pagination : false    });  /* ------ jQuery for Easing min -- */    // Smooth scrolling using jQuery easing    $('a.js-scroll-trigger[href*="#"]:not([href="#"])').on('click', function () {      if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {        var target = $(this.hash);        target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');        if (target.length) {          $('html, body').animate({            scrollTop: (target.offset().top - 54)          }, 1000, "easeInOutExpo");          return false;        }      }    });  /* --------- Wow Init ------ */  new WOW().init();/*----- Preloader ----- */  $(window).load(function() {		setTimeout(function() {      $('#loading').fadeOut('slow', function() {      });    }, 3000);  });/*----- Subscription Form ----- */$(document).ready(function() {  // jQuery Validation  /*$("#chimp-form").validate({    // if valid, post data via AJAX    submitHandler: function(form) {      $.post("assets/php/subscribe.php", { email: $("#email").val() }, function(data) {        $('#response').html(data);      });    },    // all fields are required    rules: {      email: {        required: true,        email: true      }    }  });*/  $("#forgotPass").click(function() {    $('.with-succes, .with-errors').html('');    $("#contactForm").hide();    $("#contactForm2").show();  });  $("#alreadyHave").click(function() {    $('.with-succes, .with-errors').html('');    $("#contactForm2").hide();    $("#contactForm").show();  });  $(".feedback_but").click(function() {    $('.feedback_popup').show();  });  $(".feedback_close").click(function() {    $('.feedback_popup').hide();  });  $('.feedback_send').click(function(ev) {    ev.preventDefault();    $.ajax({      type: 'POST',      url: 'home/feedback',      dataType: 'json',      data: {        femail: document.getElementsByName("femail")[0].value,        fmessage: document.getElementsByName("fmessage")[0].value      },      success: (data) => {},      error: (err) => {}    });    $('.feedback_popup').hide();  });});// Accordion //function toggleChevron(e) {   $(e.target)     .prev('.panel-heading')     .find("span.glyphicon")     .toggleClass('glyphicon-chevron-down glyphicon-chevron-right'); } $('#accordion').on('hide.bs.collapse show.bs.collapse', toggleChevron);});
 |