79 lines
2.1 KiB
JavaScript
79 lines
2.1 KiB
JavaScript
$(document).ready(function(){
|
|
|
|
$('.fa-bars').click(function(){
|
|
$(this).toggleClass('fa-times');
|
|
$('.navbar').toggleClass('nav-toggle');
|
|
});
|
|
|
|
$(window).on('load scroll',function(){
|
|
$('.fa-bars').removeClass('fa-times');
|
|
$('.navbar').removeClass('nav-toggle');
|
|
|
|
if($(window).scrollTop()>50)
|
|
{
|
|
$('.header').css({'background':'#08509c','box-shadow':'none'});
|
|
// $('.header .navbar ul li a').css({'color':'#000000'});
|
|
}
|
|
else
|
|
{
|
|
$('.header').css({'background':'#002e5f','box-shadow':'0 .2rem .5rem rgba(0,0,0,.4)'});
|
|
// $('.header .navbar ul li a').css({'color':'#ffffff','font-weight':'100px'});
|
|
}
|
|
});
|
|
|
|
const counters = document.querySelectorAll('.counter');
|
|
const speed = 120;
|
|
counters.forEach(counter => {
|
|
const updateCount = () => {
|
|
const target = +counter.getAttribute('data-target');
|
|
const count = +counter.innerText;
|
|
const inc = target / speed;
|
|
if (count < target) {
|
|
counter.innerText = count + inc;
|
|
setTimeout(updateCount, 1);
|
|
} else {
|
|
counter.innerText = target;
|
|
}
|
|
};
|
|
updateCount();
|
|
});
|
|
|
|
(function ($) {
|
|
"use strict";
|
|
|
|
$(".clients-carousel").owlCarousel({
|
|
autoplay: true,
|
|
dots: true,
|
|
loop: true,
|
|
responsive: { 0: {items: 2}, 768: {items: 4}, 900: {items: 6} }
|
|
});
|
|
|
|
$(".testimonials-carousel").owlCarousel({
|
|
autoplay: true,
|
|
dots: true,
|
|
loop: true,
|
|
responsive: { 0: {items: 1}, 576: {items: 2}, 768: {items: 3}, 992: {items: 4} }
|
|
});
|
|
|
|
})(jQuery);
|
|
|
|
$(window).scroll(function () {
|
|
if ($(this).scrollTop() > 100) {
|
|
$('.back-to-top').fadeIn('slow');
|
|
} else {
|
|
$('.back-to-top').fadeOut('slow');
|
|
}
|
|
});
|
|
$('.back-to-top').click(function () {
|
|
$('html, body').animate({scrollTop: 0}, 1500, 'easeInOutExpo');
|
|
return false;
|
|
});
|
|
|
|
$('.accordion-header').click(function(){
|
|
$('.accordion .accordion-body').slideUp(500);
|
|
$(this).next('.accordion-body').slideDown(500);
|
|
$('.accordion .accordion-header span').text('+');
|
|
$(this).children('span').text('-');
|
|
});
|
|
|
|
}); |