modif comtabilite
This commit is contained in:
@@ -1,54 +1,105 @@
|
||||
function divisionnav() {
|
||||
$('.navigation li:nth-child(n+4)').wrapAll("<div class='cc' />")
|
||||
}
|
||||
function activenav() {
|
||||
// Cache selectors
|
||||
var lastId,
|
||||
topMenu = $(".navigation"),
|
||||
topMenuHeight = topMenu.outerHeight()+500,
|
||||
// All list items
|
||||
menuItems = topMenu.find("a"),
|
||||
// Anchors corresponding to menu items
|
||||
scrollItems = menuItems.map(function(){
|
||||
var item = $($(this).attr("href"));
|
||||
if (item.length) { return item; }
|
||||
});
|
||||
|
||||
// Bind click handler to menu items
|
||||
// so we can get a fancy scroll animation
|
||||
|
||||
// Bind to scroll
|
||||
$(window).scroll(function(){
|
||||
// Get container scroll position
|
||||
var fromTop = $(this).scrollTop()+topMenuHeight;
|
||||
|
||||
// Get id of current scroll item
|
||||
var cur = scrollItems.map(function(){
|
||||
if ($(this).offset().top < fromTop)
|
||||
return this;
|
||||
});
|
||||
// Get the id of the current element
|
||||
cur = cur[cur.length-1];
|
||||
var id = cur && cur.length ? cur[0].id : "";
|
||||
|
||||
if (lastId !== id) {
|
||||
lastId = id;
|
||||
// Set/remove active class
|
||||
menuItems
|
||||
.parent().removeClass("active")
|
||||
.end().filter("[href='#"+id+"']").parent().addClass("active");
|
||||
}
|
||||
function mCustomScrollbar() {
|
||||
$(window).on("load",function(){
|
||||
$(".content").mCustomScrollbar();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function fullpage() {
|
||||
$('#start').fullpage({
|
||||
anchors: ['home', 'fullvideo', 'vidéos', 'biographie', 'photographie', 'presse', 'prochaines_dates', 'contact'],
|
||||
scrollOverflow: true
|
||||
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() {
|
||||
fullpage();
|
||||
activenav();
|
||||
mCustomScrollbar();
|
||||
fixscroll();
|
||||
active();
|
||||
scrollify();
|
||||
scrollClick();
|
||||
hamburger();
|
||||
hambugeract();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user