?
| Current Path : /home/webyoo/www/events/crm/surfing/js/ |
| Current File : /home/webyoo/www/events/crm/surfing/js/script.js |
$(window).on("load", function () {
"use strict";
/* ===================================
Loading Timeout
====================================== */
$('.side-menu').removeClass('hidden');
setTimeout(function(){
$('.loader').fadeOut();
}, 1000);
$('.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
$('header').addClass('header-appear');
}
else {
$('header').removeClass('header-appear');
}
});
//scroll to appear
$(window).on('scroll', function () {
if ($(this).scrollTop() > 500)
$('.scroll-top-arrow').fadeIn('slow');
else
$('.scroll-top-arrow').fadeOut('slow');
});
//Click event to scroll to top
$(document).on('click', '.scroll-top-arrow', function () {
$('html, body').animate({scrollTop: 0}, 800);
return false;
});
$(".scroll").on("click", function (event) {
event.preventDefault();
$("html,body").animate({
scrollTop: $(this.hash).offset().top - 60}, 1200);
});
$(".slider-btn").on("click", function (event) {
event.preventDefault();
$("html,body").animate({
scrollTop: $(this.hash).offset().top - 60}, 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")
});
}
/* ===================================
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));
// }
// });
// });
// });
/* ===================================
Mouse parallax
====================================== */
/* =====================================
Parallax
====================================== */
if ($(window).width() > 992) {
$(".parallax").parallaxie({
speed: 0.55,
offset: 0,
});
}
/* ===================================
Owl Carousel
====================================== */
/* ===================================
Start COUNT DOWN
====================================== */
//Testimonial Slider
$('.team-carousel').owlCarousel({
items: 5,
autoplay: 1500,
smartSpeed: 1500,
autoplayHoverPause: true,
slideBy: 1,
loop: false,
margin: 30,
dots: false,
nav: false,
responsive: {
1200: {
items: 3,
},
768: {
items: 2,
},
480: {
items: 1,
},
320: {
items: 1,
},
}
});
$('.partners-slider').owlCarousel({
items: 5,
autoplay: 1500,
smartSpeed: 1500,
autoplayHoverPause: true,
slideBy: 1,
loop: true,
margin: 30,
dots: false,
nav: false,
responsive: {
1200: {
items: 5,
},
768: {
items: 3,
},
480: {
items: 2,
},
320: {
items: 1,
},
}
});
$("#testimonial-slider").owlCarousel({
items: 2,
autoplay: 1500,
smartSpeed: 1500,
autoplayHoverPause: true,
slideBy: 1,
loop: true,
margin: 0,
dots: true,
nav: false,
responsive: {
1200: {
items: 2,
},
768: {
items: 2,
},
480: {
items: 1,
autoplay:false,
},
320: {
items: 1,
autoplay:false,
},
}
});
/*============================================*
Cube Portfolio
* ============================================*/
$('.portfolio-items').owlCarousel({
items: 4,
autoplay: 1500,
smartSpeed: 1500,
autoplayHoverPause: true,
slideBy: 1,
loop: false,
margin: 10,
dots: false,
nav: false,
responsive: {
1200: {
items: 4,
},
768: {
items: 2,
},
480: {
items: 1,
},
320: {
items: 1,
},
}
});
/* ===================================
WOW Animation
====================================== */
if ($(window).width() > 991) {
var wow = new WOW({
boxClass: 'wow',
animateClass: 'animated',
offset: 0,
mobile: false,
live: true
});
new WOW().init();
}
//modern agency index
$("#vertical-bullets").show().revolution({
sliderType: "standard",
sliderLayout: "fullscreen",
scrollbarDrag: "true",
dottedOverlay: "none",
navigation: {
keyboardNavigation: "on",
keyboard_direction: "horizontal",
mouseScrollNavigation: "off",
mouseScrollReverse: "default",
onHoverStop: "off",
bullets: {
enable: true,
hide_onmobile: true,
hide_under: 769,
style: "surfing",
hide_onleave: false,
direction: "vertical",
h_align: "left",
v_align: "center",
h_offset: 30,
v_offset: 0,
space: 5,
tmp: '<div class="tp-bullet-inner"></div><div class="tp-line"></div>'
},
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%",
presize: true
},
responsiveLevels: [4096, 1260, 778, 480],
visibilityLevels: [4096, 1260, 778, 480],
gridwidth: [1140, 1024, 750, 480],
gridheight: [600, 500, 500, 350],
lazyType: "none",
parallax: {
type: "mouse",
origon: "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: 360,
hideAllCaptionAtLilmit: 360,
debugMode: false,
fallbacks: {
simplifyAll: "off",
nextSlideOnWindowFocus: "off",
disableFocusListener: false,
}
});
});