(function ($) {
'use strict';
function homeSlide() {
$('.slide-carousel').owlCarousel({
loop: true,
autoplay: true,
margin: 10,
delay:3000,
nav: true,
navText: ["",""],
dots: false,
responsive: {
0: {
items: 1
},
600: {
items: 1
},
1000: {
items: 1
}
}
})
}
homeSlide()
// counter up
$('.counter').counterUp({
delay: 10,
time: 1000
});
// mobile size
function menuSmall() {
$(".dropdown-toggle").on("click", function(e) {
if (window.innerWidth <= 991) {
e.preventDefault();
$(this).parent().toggleClass("current");
$(this).next().slideToggle();
}
});
}
menuSmall()
// scrollingup
function scrolltop() {
$(window).on('scroll', function () {
if ($(this).scrollTop() > 200) {
$('.scrollingUp').addClass('is-active');
} else {
$('.scrollingUp').removeClass('is-active');
}
});
$('.scrollingUp').on('click', function () {
$("html, body").animate({
scrollTop: 0
}, 600);
return false;
});
}
scrolltop()
// sticky menu
function Stickymenu() {
if ($(".sticky").length > 0) {
$(window).on('scroll', function () {
if ($(window).scrollTop() >= 250) {
$('.sticky').addClass('sticky-menu');
}
else {
$('.sticky').removeClass('sticky-menu');
}
});
}
}
Stickymenu()
})(jQuery);