?
| Current Path : /home/webyoo/www/backup/allback/docteur-site/cv/sym/a/events/crm/minimal-creative/js/ |
| Current File : /home/webyoo/www/backup/allback/docteur-site/cv/sym/a/events/crm/minimal-creative/js/script.js |
jQuery(window).on("load", function () {
"use strict";
/* ===================================
Loading Timeout
====================================== */
$('.side-menu').removeClass('hidden');
setTimeout(function(){
$("#loader-fade").fadeOut(800);
}, 1500);
// $('.navbar-collapse .navbar-nav .nav-link:nth-child(1)').addClass('active');
$('.navbar-collapse .navbar-nav .nav-link:nth-child(2)').removeClass('active');
});
jQuery(function ($) {
"use strict";
$(window).on('scroll', function () {
if ($(this).scrollTop() > 260) { // Set position from top to add class
$('.fixed-nav-on-scroll').removeClass('d-none');
}
else {
$('.fixed-nav-on-scroll').addClass('d-none');
}
});
/* ===================================
Nav Scroll
====================================== */
$(".scroll").on("click", function(event){
event.preventDefault();
$('html,body').animate({
scrollTop: $(this.hash).offset().top - 0}, 1100);
});
/* ===================================
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")
})
}
/* =====================================
Wow
======================================== */
if ($(window).width() > 767) {
var wow = new WOW({
boxClass: 'wow',
animateClass: 'animated',
offset: 0,
mobile: false,
live: true
});
new WOW().init();
}
/* ===================================
Rotating Text
====================================== */
if ($(".js-rotating").length) {
$(".js-rotating").Morphext({
// The [in] animation type. Refer to Animate.css for a list of available animations.
animation: "flipInX",
// An array of phrases to rotate are created based on this separator. Change it if you wish to separate the phrases differently (e.g. So Simple | Very Doge | Much Wow | Such Cool).
separator: ",",
// The delay between the changing of each phrase in milliseconds.
speed: 3000,
complete: function () {
// Called after the entrance animation is executed.
}
});
}
/* ===================================
Arrow Box Hide And Show On Mouse Hover
====================================== */
$('.custom-box.bg-orange').on("mouseenter", function () {
$('.arrow-box').addClass('arrow-box-hidden');
$('.arrow-box .las').addClass('las-hidden');
$('.arrow-box1').addClass('arrow-box1-display');
$('.arrow-box1 .las').addClass('las-visible');
});
$('.custom-box').on("mouseleave", function () {
$('.arrow-box').removeClass('arrow-box-hidden');
$('.arrow-box .las').removeClass('las-hidden');
$('.arrow-box1').removeClass('arrow-box1-display');
$('.arrow-box1 .las').removeClass('las-visible');
});
//Counter
$('.count').each(function () {
$(this).appear(function () {
$(this).prop('Counter', 0).animate({
Counter: $(this).text()
}, {
duration: 3000,
easing: 'swing',
step: function (now) {
$(this).text(Math.ceil(now));
}
});
});
});
/* =====================================
Sponsor carousel
====================================== */
$('.sponsor-tags').owlCarousel({
loop: true,
margin: 20,
slideSpeed: 3000,
nav: false,
dots: false,
autoplay: true,
autoplayTimeout: 2000,
autoplayHoverPause: true,
responsive: {
0: {
items: 2
},
600: {
items: 4
},
1000: {
items: 6
},
}
});
/* ===================================
Animated Cursor
====================================== */
function animatedCursor() {
if ($("#animated-cursor").length) {
var e = {x: 0, y: 0}, t = {x: 0, y: 0}, n = .25, o = !1, a = document.getElementById("cursor"),
i = document.getElementById("cursor-loader");
TweenLite.set(a, {xPercent: -50, yPercent: -50}), document.addEventListener("mousemove", function (t) {
var n = window.pageYOffset || document.documentElement.scrollTop;
e.x = t.pageX, e.y = t.pageY - n
}), TweenLite.ticker.addEventListener("tick", function () {
o || (t.x += (e.x - t.x) * n, t.y += (e.y - t.y) * n, TweenLite.set(a, {x: t.x, y: t.y}))
}),
$(".animated-wrap").mouseenter(function (e) {
TweenMax.to(this, .3, {scale: 2}), TweenMax.to(a, .3, {
scale: 2,
borderWidth: "1px",
opacity: .2
}), TweenMax.to(i, .3, {
scale: 2,
borderWidth: "1px",
top: 1,
left: 1
}), TweenMax.to($(this).children(), .3, {scale: .5}), o = !0
}),
$(".animated-wrap").mouseleave(function (e) {
TweenMax.to(this, .3, {scale: 1}), TweenMax.to(a, .3, {
scale: 1,
borderWidth: "2px",
opacity: 1
}), TweenMax.to(i, .3, {
scale: 1,
borderWidth: "2px",
top: 0,
left: 0
}), TweenMax.to($(this).children(), .3, {scale: 1, x: 0, y: 0}), o = !1
}),
$(".testimonial-images .animated-wrap").mouseenter(function (e) {
TweenMax.to(this, .3, {scale: 2}), TweenMax.to(a, .3, {
scale: 2,
borderWidth: "1px",
opacity: .2
}), TweenMax.to(i, .3, {
scale: 2,
borderWidth: "1px",
top: 1,
left: 1
}), TweenMax.to($(this).children(), .3, {scale: .5}), o = !0
}),
$(".animated-wrap").mousemove(function (e) {
var n, o, i, l, r, d, c, s, p, h, x, u, w, f, m;
n = e, o = 2, i = this.getBoundingClientRect(), l = n.pageX - i.left, r = n.pageY - i.top, d = window.pageYOffset || document.documentElement.scrollTop, t.x = i.left + i.width / 2 + (l - i.width / 2) / o, t.y = i.top + i.height / 2 + (r - i.height / 2 - d) / o, TweenMax.to(a, .3, {
x: t.x,
y: t.y
}), s = e, p = c = this, h = c.querySelector(".animated-element"), x = 20, u = p.getBoundingClientRect(), w = s.pageX - u.left, f = s.pageY - u.top, m = window.pageYOffset || document.documentElement.scrollTop, TweenMax.to(h, .3, {
x: (w - u.width / 2) / u.width * x,
y: (f - u.height / 2 - m) / u.height * x,
ease: Power2.easeOut
})
}),
$(".hide-cursor,.btn,.tp-bullets").mouseenter(function (e) {
TweenMax.to("#cursor", .2, {borderWidth: "1px", scale: 2, opacity: 0})
}), $(".hide-cursor,.btn,.tp-bullets").mouseleave(function (e) {
TweenMax.to("#cursor", .3, {borderWidth: "2px", scale: 1, opacity: 1})
}),$(".link").mouseenter(function (e) {
TweenMax.to("#cursor", .2, {
borderWidth: "0px",
scale: 3,
backgroundColor: "rgba(5,5,5,0.27)",
opacity: .15
})
}), $(".link").mouseleave(function (e) {
TweenMax.to("#cursor", .3, {
borderWidth: "2px",
scale: 1,
backgroundColor: "rgba(12,12,12,0)",
opacity: 1
})
})
}
}
if ($(window).width() > 991) {
setTimeout(function () {
animatedCursor();
}, 1000);
}
});