last batch of adjustements

This commit is contained in:
Bachir Soussi Chiadmi
2018-01-31 19:38:26 +01:00
parent 2600e318dd
commit fdb2b653d9
14 changed files with 600 additions and 387 deletions
+4 -1
View File
@@ -1,2 +1,5 @@
jQuery(document).ready(function($){if($(window).width()>600){var $grid=$('.grid').isotope({itemSelector:'.grid-block',transitionDuration:'0.4s'});$('#left-nav a, .projet-block nav.categories a').on('click',function(e){e.preventDefault();var filterValue=$(this).attr('data-filter');$grid.isotope({filter:filterValue});return false;});}});
jQuery(document).ready(function($){$(window).scroll(function(){var topOfWindow=$(window).scrollTop();if(topOfWindow>100){$("#top-bar").addClass("reduced");}
else{$("#top-bar").removeClass("reduced");}});if($(window).width()>600&&$('body').is('.home')){var $grid=$('.grid').isotope({itemSelector:'.grid-block',transitionDuration:'0.4s'});$grid.imagesLoaded().progress(function(){$grid.isotope('layout');});$('nav.categories a').on('click',function(e){e.preventDefault();if($(this).is('.active')){location.hash='';}else{var filterValue=$(this).attr('data-filter');location.hash=encodeURIComponent(filterValue);}
return false;});function onHashchange(){var hashFilter=decodeURIComponent(location.hash.replace('#',''));$('nav.categories a').removeClass('active');if(!hashFilter){$grid.isotope({filter:'*'});}else{$('nav.categories a[data-filter='+hashFilter+']').addClass('active');$grid.isotope({filter:'.'+hashFilter});}}
$(window).on('hashchange',onHashchange);onHashchange();}});