123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- function mCustomScrollbar() {
- $(window).on("load",function(){
- $(".content").mCustomScrollbar();
- });
- }
- function active() {
- $chapone = $('.section > div > .chap > a:nth-of-type(1)');
- $chap = $('.section > div > .chap > a');
- $chapone.addClass('active');
- $chap.click(function(event) {
- $(this).parent().children('a').removeClass('active');
- $(this).addClass('active');
- return false;
- });
- }
- function ScaleFirst() {
- var $bck = $('#start > .section');
- $bck.css( {
- 'transform': 'scale(0.95, 0.95)',
- 'transition': 'all 0.8s ease',
- });
- }
- function ScaleLast() {
- var $bck = $('#start > .section');
- $bck.css( {
- 'transform': 'scale(1, 1)',
- 'transition': 'all 0.8s ease',
- });
- }
- function scrollClick() {
- $('ul.navigation').singlePageNav({
- updateHash: false,
- currentClass: 'active',
- speed:1500,
- });
- }
- function scrollify() {
- $.scrollify({
- section : "#start .section",
- scrollSpeed:1500,
- touchScroll:true,
- overflowScroll: false,
- // before: function() {
- // ScaleFirst();
- // },
- // after: function() {
- // ScaleLast();
- // },
- });
- }
- function fixscroll() {
- $('#fullvideo, #vidéos, #videos, #vídeos')
- .click(function(){
- $(this).find('iframe').addClass('clicked')})
- .mouseleave(function(){
- $(this).find('iframe').removeClass('clicked')});
- }
- function hamburger(){
- var forEach=function(t,o,r){if("[object Object]"===Object.prototype.toString.call(t))for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&&o.call(r,t[c],c,t);else for(var e=0,l=t.length;l>e;e++)o.call(r,t[e],e,t)};
- var hamburgers = document.querySelectorAll(".hamburger");
- if (hamburgers.length > 0) {
- forEach(hamburgers, function(hamburger) {
- hamburger.addEventListener("click", function() {
- this.classList.toggle("is-active");
- }, false);
- });
- }
- }
- function hambugeract(){
- var $act = $("button");
- var $nav = $(".catbox");
- var $li = $(".catlist a");
- $act.click(function(event) {
- $nav.toggleClass("active");
- });
- $li.click(function(event) {
- $nav.removeClass('active');
- $act.removeClass('is-active');
- });
- }
- $(document).ready(function() {
- mCustomScrollbar();
- fixscroll();
- active();
- scrollify();
- scrollClick();
- hamburger();
- hambugeract();
- });
|