?
| Current Path : /home/webyoo/www/backup/allback/docteur-site/cv/sym/a/events/crm/digital-startup/js/ |
| Current File : /home/webyoo/www/backup/allback/docteur-site/cv/sym/a/events/crm/digital-startup/js/script.js |
jQuery(window).on("load", function () {
"use strict";
/* ===================================
Loading Timeout
====================================== */
$("#loader-fade").fadeOut(800);
$('.navbar-nav .nav-item:nth-child(1) .nav-link').addClass('active');
$('.navbar-nav .nav-item:nth-child(2) .nav-link').removeClass('active');
});
jQuery(function ($) {
"use strict";
var $window = $(window);
var windowsize = $(window).width();
/* ===================================
Nav Scroll
====================================== */
$(".scroll").on("click", function(event){
event.preventDefault();
$('html,body').animate({
scrollTop: $(this.hash).offset().top - 40}, 1100);
});
/*----- counter js ----*/
$(".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));
}
});
});
});
/*===================================
index business
====================================*/
if($(".just-sidemenu").length){
var anchor_point = $(".rotating-words").height();
var side_toggle = $(".just-sidemenu #sidemenu_toggle");
side_toggle.addClass("toggle_white");
$window.on("scroll", function () {
if ($window.scrollTop() >= anchor_point) {
side_toggle.removeClass("toggle_white");
} else {
side_toggle.addClass("toggle_white");
}
});
}
/*====================================
da-thumb
*====================================*/
$(function() {
$('.da-thumbs > li ').each( function() { $(this).hoverdir(); } );
});
/*----- Menu On click -----*/
if ($("#sidemenu_toggle").length) {
$("body").addClass("pushwrap");
$("#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")
}), $("#btn_sideNavClose").on("click", function () {
$(".side-menu").removeClass("side-menu-active"), $("#close_side_menu").fadeOut(200), $(".pushwrap").removeClass("active")
});
}
/*hide menu on mobile click*/
$(".navbar-nav>li>a").on("click", function(){
$(".navbar-collapse").collapse("hide");
});
/*------ MENU Fixed ------*/
if ($("nav.navbar").hasClass("static-nav")) {
$window.scroll(function () {
var $scroll = $window.scrollTop();
var $navbar = $(".static-nav");
if ($scroll > 200) {
$navbar.addClass("fixedmenu");
} else {
$navbar.removeClass("fixedmenu");
}
});
}
/*bottom menu fix*/
if ($("nav.navbar").hasClass("fixed-bottom")) {
var navHeight = $(".fixed-bottom").offset().top;
$window.scroll(function () {
if ($window.scrollTop() > navHeight) {
$('.fixed-bottom').addClass('fixedmenu');
} else {
$('.fixed-bottom').removeClass('fixedmenu');
}
});
}
/*===================================
index business
====================================*/
/* ====================================
Nav Fixed On Scroll
======================================= */
if ($("nav.navbar").hasClass("static-nav")) {
$(window).on("scroll", function () {
var $scroll = $window.scrollTop();
if ($scroll >= 80) {
$('header').addClass('header-appear');
} else {
$('header').removeClass('header-appear');
}
});
}
/*bottom menu fix*/
if ($("nav.navbar").hasClass("bottom-nav")) {
var navHeight = $(".bottom-nav").offset().top;
$(window).on("scroll", function () {
if ($window.scrollTop() > navHeight) {
$('.bottom-nav').addClass('fixed-menu');
} else {
$('.bottom-nav').removeClass('fixed-menu');
}
});
}
if ($("nav.navbar").hasClass("bottom-nav")) {
$(window).on("scroll", function () {
var $scroll = $window.scrollTop();
var $bottom = $(".bottom-nav");
if ($scroll >= 400) {
$bottom.addClass("scroll-menu");
} else {
$bottom.removeClass("scroll-menu");
}
});
}
$(window).on('scroll', function () {
if ($(this).scrollTop() >= 80) { // Set position from top to add class
$('header').addClass('header-appear');
}
else {
$('header').removeClass('header-appear');
}
});
/* ===================================
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")
})
}
/* ===================================
About Box Hover Setting
====================================== */
$(".about-box").on("mouseenter", function () {
$(".about-box.active").addClass("about-box-green");
})
$(".about-box").on("mouseleave", function () {
$(".about-box.active").removeClass("about-box-green");
})
/* =====================================
Wow
======================================== */
if ($(window).width() > 767) {
var wow = new WOW({
boxClass: 'wow',
animateClass: 'animated',
offset: 0,
mobile: false,
live: true
});
new WOW().init();
}
/* ----- Full Screen ----- */
function resizebanner() {
var $fullscreen = $(".full-screen");
$fullscreen.css("height", $window.height());
$fullscreen.css("width", $window.width());
}
resizebanner();
$window.resize(function () {
resizebanner();
});
/* ===================================
Features Section Number Scroller
====================================== */
$(".stats").each(function () {
$('.numscroller').appear(function () {
$(this).prop('Counter',0).animate({
Counter: $(this).text()
}, {
duration: 5000,
easing: 'swing',
step: function (now) {
$(this).text(Math.ceil(now));
}
});
});
});
/* ===================================
Equal Heights
====================================== */
checheight();
$window.on("resize", function () {
checheight();
});
function checheight() {
var $smae_height = $(".equalheight");
if ($smae_height.length) {
if (windowsize > 767) {
$smae_height.matchHeight({
property: "height",
});
}
}
}
/* ===================================
Animated Progress Bar
====================================== */
$(".progress-bar").each(function () {
$(this).appear(function () {
$(this).animate({width: $(this).attr("aria-valuenow") + "%"}, 2000)
});
});
/* ===================================
Parallax
====================================== */
if (windowsize > 992) {
$(".parallaxie").parallaxie({
speed: 0.4,
offset: 0
});
}
/* ===================================
Popup Icons
====================================== */
$(function(){
var elems = [$('i.circle-bg-fb'), $('i.circle-bg-tw'), $('i.circle-bg-p'), $('i.circle-bg-i')];
var cls = ["circle-bg-fb-end", "circle-bg-tw-end", "circle-bg-p-end", "circle-bg-i-end",];
$('.social-icons-popup').on("mouseenter", function(){
for(var i=0; i<elems.length; i++) {
elems[i].addClass(cls[i]);
};
}).on("click", function(){
for(var i=0; i<elems.length; i++) {
elems[i].removeClass(cls[i]);
};
});
});
/* ===================================
Cube Portfolio
====================================== */
$('#js-grid-mosaic-flat').cubeportfolio({
filters: '#js-filters-mosaic-flat',
layoutMode: 'mosaic',
sortByDimension: true,
mediaQueries: [{
width: 1500,
cols: 4,
}, {
width: 1100,
cols: 4,
}, {
width: 800,
cols: 2,
}, {
width: 576,
cols: 1,
options: {
caption: '',
gapHorizontal: 15,
gapVertical: 15,
}
}],
defaultFilter: '*',
animationType: 'fadeOutTop',
gapHorizontal: 0,
gapVertical: 0,
gridAdjustment: 'responsive',
caption: 'fadeIn',
displayType: 'fadeIn',
displayTypeSpeed: 100,
// lightbox
lightboxDelegate: '.cbp-lightbox',
lightboxGallery: true,
lightboxTitleSrc: 'data-title',
lightboxCounter: '<div class="cbp-popup-lightbox-counter">{{current}} of {{total}}</div>',
});
/* ===================================
Fancy Box
====================================== */
$('[data-fancybox]').fancybox({
protect: true,
animationEffect: "fade",
hash: null,
});
/* =====================================
Select
======================================== */
$(document).ready(function(){
// Initialize select2
$("#services").select2();
});
/* ===================================
Owl Carousel
====================================== */
/* Team Classic */
$(".team-classic.owl-team").owlCarousel({
items: 3,
margin: 30,
dots: true,
nav: false,
loop:true,
autoplay: true,
smartSpeed:500,
navSpeed: true,
autoplayHoverPause:true,
responsiveClass:true,
responsive: {
992: {
items: 3
},
600: {
items: 2
},
320: {
items: 1
}
}
});
/* Brand Carousel */
$('.brand-carousel').owlCarousel({
margin: 75,
nav: false,
navText: [
'<i class="ti ti-angle-left"></i>',
'<i class="ti ti-angle-right"></i>'
],
dots: false,
autoWidth: false,
autoplay: 300,
autoplayHoverPause: false,
loop: true,
responsive: {
0: {
items: 1
},
480: {
items: 2
},
600: {
items: 4
},
1000: {
items: 5
}
}
});
/* Request */
$(".owl-split").owlCarousel({
items: 1,
margin: 0,
dots: false,
nav: false,
loop: true,
autoplay: true,
smartSpeed:500,
navSpeed: true,
autoplayHoverPause:true,
responsiveClass:true
});
/* ===================================
Slick
====================================== */
$('.testimonial-for').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
infinite: true,
speed: 500,
fade: true,
cssEase: 'linear',
asNavFor: '.testimonial-nav'
});
$('.testimonial-nav').slick({
slidesToShow: 1,
slidesToScroll: 1,
asNavFor: '.testimonial-for',
dots: true,
arrows: false,
autoplay: true,
autoplaySpeed: 2000
});
/* ===================================
Revolution Slider
====================================== */
//single item indexes
$("#rev_single").show().revolution({
sliderType: "hero",
jsFileLocation: "js/revolution",
sliderLayout: "fullscreen",
scrollbarDrag: "true",
dottedOverlay: "none",
delay: 9000,
navigation: {},
responsiveLevels: [1240, 1024, 778, 480],
visibilityLevels: [1240, 1024, 778, 480],
gridwidth: [1170, 1024, 778, 480],
gridheight: [868, 768, 960, 720],
lazyType: "none",
parallax: {
type: "scroll",
origo: "slidercenter",
speed: 400,
levels: [10, 15, 20, 25, 30, 35, 40, -10, -15, -20, -25, -30, -35, -40, -45, 55]
},
shadow: 0,
spinner: "off",
autoHeight: "off",
fullScreenAutoWidth: "off",
fullScreenAlignForce: "off",
fullScreenOffsetContainer: "",
disableProgressBar: "on",
hideThumbsOnMobile: "off",
hideSliderAtLimit: 0,
hideCaptionAtLimit: 0,
hideAllCaptionAtLilmit: 0,
debugMode: false,
fallbacks: {
simplifyAll: "off",
disableFocusListener: false
}
});
$("#rev_slider_18_1").show().revolution({
sliderType:"standard",
jsFileLocation:"//revslider.ads:7080/revslider/public/assets/js/",
sliderLayout:"fullscreen",
dottedOverlay:"none",
delay:9000,
navigation: {
keyboardNavigation:"off",
keyboard_direction: "horizontal",
mouseScrollNavigation:"off",
mouseScrollReverse:"default",
onHoverStop:"off",
bullets: {
enable:true,
hide_onmobile:false,
style:"hermes",
hide_onleave:false,
direction:"vertical",
h_align:"right",
v_align:"center",
h_offset:20,
v_offset:0,
space:5,
tmp: '<div class="tp-bullet-inner"></div><div class="tp-line"></div>'
}
},
responsiveLevels: [1240, 1025, 778, 480],
visibilityLevels: [1240, 1025, 778, 480],
gridwidth: [1140, 1025, 768, 480],
gridheight: [660, 650, 600, 490],
lazyType:"none",
shadow:0,
spinner:"off",
stopLoop:"off",
stopAfterLoops:-1,
stopAtSlide:-1,
shuffle:"off",
autoHeight:"off",
fullScreenAutoWidth:"off",
fullScreenAlignForce:"off",
fullScreenOffsetContainer: "",
fullScreenOffset: "",
disableProgressBar:"on",
hideThumbsOnMobile:"off",
hideSliderAtLimit:0,
hideCaptionAtLimit:0,
hideAllCaptionAtLilmit:0,
debugMode:false,
fallbacks: {
simplifyAll:"off",
nextSlideOnWindowFocus:"off",
disableFocusListener:false,
}
});
$("#banner-main").show().revolution({
sliderType: "standard",
sliderLayout: "fullscreen",
scrollbarDrag: "true",
dottedOverlay: "none",
navigation: {
keyboardNavigation: "off",
keyboard_direction: "horizontal",
mouseScrollNavigation: "off",
bullets: {
style: "",
enable: true,
rtl: false,
hide_onmobile: false,
hide_onleave: false,
hide_under: 767,
hide_over: 9999,
tmp: '',
direction: "vertical",
space: 10,
h_align: "right",
v_align: "center",
h_offset: 40,
v_offset: 0
},
arrows: {
enable: false,
hide_onmobile: true,
hide_onleave: false,
hide_under: 767,
left: {
h_align: "left",
v_align: "center",
h_offset: 20,
v_offset: 30,
},
right: {
h_align: "right",
v_align: "center",
h_offset: 20,
v_offset: 30
},
},
touch: {
touchenabled: "on",
swipe_threshold: 75,
swipe_min_touches: 1,
swipe_direction: "horizontal",
drag_block_vertical: false,
}
},
viewPort: {
enable: true,
outof: "pause",
visible_area: "90%"
},
responsiveLevels: [4096, 1024, 778, 480],
gridwidth: [1140, 1024, 768, 480],
gridheight: [600, 500, 500, 350],
lazyType: "none",
parallax: {
type: "mouse",
origo: "slidercenter",
speed: 9000,
levels: [2, 3, 4, 5, 6, 7, 12, 16, 10, 50],
},
shadow: 0,
spinner: "off",
stopLoop: "off",
stopAfterLoops: -1,
stopAtSlide: -1,
shuffle: "off",
autoHeight: "off",
hideThumbsOnMobile: "off",
hideSliderAtLimit: 0,
hideCaptionAtLimit: 0,
hideAllCaptionAtLilmit: 0,
debugMode: false,
fallbacks: {
simplifyAll: "off",
nextSlideOnWindowFocus: "off",
disableFocusListener: false,
}
});
});