Geoffrey Montel c6e77e848b review code
2021-07-28 15:03:34 +02:00

115 lines
3.0 KiB
JavaScript

(function($) {
"use strict";
$(window).on('load', function() {
/*
MixitUp
========================================================================== */
$('#portfolio').mixItUp({
layout: {
display: 'flex'
}
});
/*
One Page Navigation & wow js
========================================================================== */
var OnePNav = $('.onepage-nev');
var top_offset = OnePNav.height() - -0;
OnePNav.onePageNav({
currentClass: 'active',
scrollOffset: top_offset,
});
/*Page Loader active
========================================================*/
$('#preloader').fadeOut();
// Sticky Nav
$(window).on('scroll', function() {
if ($(window).scrollTop() > 200) {
$('.scrolling-navbar').addClass('top-nav-collapse');
} else {
$('.scrolling-navbar').removeClass('top-nav-collapse');
}
});
/* slicknav mobile menu active */
$('.mobile-menu').slicknav({
prependTo: '.navbar-header',
parentTag: 'liner',
allowParentLinks: true,
duplicate: true,
label: '',
closedSymbol: '<i class="icon-arrow-right"></i>',
openedSymbol: '<i class="icon-arrow-down"></i>',
});
/* WOW Scroll Spy
========================================================*/
var wow = new WOW({
//disabled for mobile
mobile: false
});
wow.init();
/* Nivo Lightbox
========================================================*/
$('.lightbox').nivoLightbox({
effect: 'fadeScale',
keyboardNav: true,
});
/* Counter
========================================================*/
$('.counterUp').counterUp({
delay: 10,
time: 1000
});
/* Back Top Link active
========================================================*/
var offset = 200;
var duration = 500;
$(window).scroll(function() {
if ($(this).scrollTop() > offset) {
$('.back-to-top').fadeIn(400);
} else {
$('.back-to-top').fadeOut(400);
}
});
$('.back-to-top').on('click',function(event) {
event.preventDefault();
$('html, body').animate({
scrollTop: 0
}, 600);
return false;
});
/* Contact autofill
========================================================*/
$("#btn-help-cyber").on("click", function() {
$("#msg_subject").val("J'ai besoin d'aide en cyber !");
});
/* Modal spawn
========================================================*/
$(".icon-eye").on("click", function() {
$('.technopreview').attr('src', $(this).data("icon"));
$('.technopreview').attr('alt', $(this).data("name"));
$('.technoname').text($(this).data("name"));
$('.technosub').text($(this).data("sub"));
$('.technodetails').text($(this).data("details"));
$('#technomodal').modal('show');
});
});
}(jQuery));