From 8f8a1a2b5c2d1d3212b8e4d77981c87147671c4c Mon Sep 17 00:00:00 2001 From: "bruno@cubedesigners.com" Date: Tue, 26 Aug 2014 15:52:20 +0000 Subject: [PATCH] --- js/realisations.js | 37 ++++++++++++++++++++++++++++++------- less/realisations.less | 22 +++++++++++++++------- 2 files changed, 45 insertions(+), 14 deletions(-) diff --git a/js/realisations.js b/js/realisations.js index 1377ef2..a68320e 100644 --- a/js/realisations.js +++ b/js/realisations.js @@ -14,6 +14,8 @@ var showIds = new Array(); function load_realisations() { initTagsLink(); + $("#main").css('height', 1500); + $(".bloc").click( function () { var currentRea = $(this).attr("data-pos"); @@ -132,7 +134,7 @@ function load_realisations() { $("html, body").animate({ scrollTop: $('#detailContent').offset().top-100 }, 1000); $('.close').css("top", $('#detailContent').offset().top); - + /* $( "#detail" ).slideDown( "slow", function() { isAnim = false; @@ -144,17 +146,28 @@ function load_realisations() { }).animate( { opacity: 1 }, { queue: true, duration: 'slow' } - ); + );*/ + + + $( "#detail" ).addClass("showDown"); + $('#detail').one("webkitTransitionEnd transitionend oTransitionEnd msTransitionEnd transitionEnd", function(e) { + isAnim = false; + addCloseAction(); + currentSlide = 1; + autoSlide = true; + initSlideShow(); + }); + } - $(".project-photo").each( function() { + /*$(".project-photo").each( function() { var id = $(this).parent().attr("data-pos"); if( id != currentRea ) { $(this).addClass("gray"); }else{ $(this).removeClass("gray"); } - }); + });*/ } }); @@ -168,8 +181,9 @@ function load_realisations() { function addCloseAction() { $(".close").click(function() { - //$("html, body").animate({ scrollTop: 0 }, 1000); - $( "#detail" ).slideUp( "slow", function() { + $("html, body").animate({ scrollTop: 0 }, 1000); + + /* $( "#detail" ).slideUp( "slow", function() { $('#detailContent').remove(); currentOpen = 0; $(".project-photo").each( function() { @@ -178,7 +192,16 @@ function addCloseAction() { }).animate( { opacity: 1 }, { queue: false, duration: 'slow' } - ); + );*/ + + $( "#detail" ).addClass("showUp"); + $('#detail').one("webkitTransitionEnd transitionend oTransitionEnd msTransitionEnd transitionEnd", function(e) { + currentOpen = 0; + $(".project-photo").each( function() { + $(this).removeClass("gray"); + }); + }); + }); } diff --git a/less/realisations.less b/less/realisations.less index bcb1e34..5124197 100644 --- a/less/realisations.less +++ b/less/realisations.less @@ -101,14 +101,22 @@ height:440px; clear: both; display:none; - margin-bottom: 15px; - width:10000px; + margin-bottom: 15px; + width:10000px; white-space: nowrap; - -webkit-transform: translate3d(0,0,0); - -webkit-backface-visibility: hidden; - -webkit-perspective: 1000; - transform: translate3d(0,0,0); - } + transition: all .5s; + } + + .showUp { + height:0px !important; + overflow:hidden; + opacity: 0; + } + + .showDown { + height:440px !important; + opacity: 1; + } #detailContent { overflow: visible; -- 2.39.5