?
| Current Path : /home/webyoo/www/backup/allback/docteur-site/cv/sym/a/events/crm/pets/js/ |
| Current File : /home/webyoo/www/backup/allback/docteur-site/cv/sym/a/events/crm/pets/js/script.js |
// if ($(window).width() < 1020) {}
/* ===================================
loader
======================================*/
$ = jQuery.noConflict();
jQuery(window).on("load", function () {
"use strict";
/* ===================================
Loading Timeout
====================================== */
$(".loader-area").fadeOut(800);
});
/*===================================
Go Top Scroll
====================================== */
$(function(){
// Scroll Event
$(window).on('scroll', function(){
var scrolled = $(window).scrollTop();
if (scrolled > 600) $('.go-top').addClass('active');
if (scrolled < 600) $('.go-top').removeClass('active');
});
// Click Event
$('.go-top').on('click', function() {
$("html, body").animate({ scrollTop: "0" }, 500);
});
});
/* ===================================
WOW
======================================*/
new WOW().init();
//*********************SMOOTH SCROLL*****************************//
$("a.pagescroll").on("click", function (event) {
event.preventDefault();
$("html,body").animate({
scrollTop: $(this.hash).offset().top
}, 1200);
});
/* ===================================
Side Menu
====================================== */
if ($("#sidemenu_toggle").length) {
$("#sidemenu_toggle").on("click", function () {
$(".pushwrap").toggleClass("active");
$(".side-menu").addClass("side-menu-active"), $("#close_side_menu").fadeIn(700)
}), $("#close_side_menu").on("click", function () {
$(".side-menu").removeClass("side-menu-active"), $(this).fadeOut(200), $(".pushwrap").removeClass("active")
}), $(".side-nav .navbar-nav .nav-link").on("click", function () {
$(".side-menu").removeClass("side-menu-active"), $("#close_side_menu").fadeOut(200), $(".pushwrap").removeClass("active")
}), $("#btn_sideNavClose").on("click", function () {
$(".side-menu").removeClass("side-menu-active"), $("#close_side_menu").fadeOut(200), $(".pushwrap").removeClass("active")
});
}
/* ===================================
Scroll
====================================== */
jQuery(function ($) {
"use strict";
$(window).on('scroll', function () {
if ($(this).scrollTop() > 260) { // Set position from top to add class
$('header').addClass('header-appear');
} else {
$('header').removeClass('header-appear');
}
});
});
/* =====================================
Pricing Card
====================================== */
$('.Pricing-sec .pricing-cards .pricing-card').on('mouseover',function () {
$('.Pricing-sec .pricing-card:nth-child(4)').removeClass('active');
});
$('.Pricing-sec .pricing-cards .pricing-card').on('mouseleave',function () {
$('.Pricing-sec .pricing-card:nth-child(4)').addClass('active');
});
/* =====================================
counter
====================================== */
$(".demo-banner").appear(function () {
$('.count').each(function () {
$(this).prop('Counter', 0).animate({
Counter: $(this).text()
}, {
duration: 5000,
easing: 'swing',
step: function (now) {
$(this).text(Math.ceil(now));
}
});
});
});
/* ===================================
Cube Portfolio
====================================== */
$('#js-grid-mosaic-flat').cubeportfolio({
filters: '#js-filters-mosaic-flat',
layoutMode: 'mosaic',
defaultFilter: '*',
animationType: 'scaleSides',
gapHorizontal: -1,
gapVertical: -1,
gridAdjustment: 'responsive',
caption: 'zoom',
displayType: 'fadeIn',
displayTypeSpeed: 100,
sortByDimension: true,
mediaQueries: [{
width: 1500,
cols: 4
}, {
width: 1100,
cols: 4
}, {
width: 768,
cols: 2
}, {
width: 480,
cols: 1
}, {
width: 320,
cols: 1
}],
// lightbox
lightboxDelegate: '.cbp-lightbox',
lightboxGallery: true,
lightboxTitleSrc: 'data-title',
lightboxCounter: '',
plugins: {
loadMore: {
element: '#js-loadMore-mosaic-flat',
action: 'click',
loadItems: 3,
}
},
});
/*=====================================
Reviews Carousel
======================================*/
$('.testimonial-box').owlCarousel({
loop: true,
margin: 20,
slideSpeed: 2000,
slideTransition: 'linear',
nav: false,
dots: false,
autoplay: true,
autoplayTimeout: 5000,
autoplayHoverPause: true,
responsive: {
0: {
items: 1
},
600: {
items: 1
},
1000: {
items: 1
},
}
});