categories page done
This commit is contained in:
+3
-1
@@ -1,4 +1,6 @@
|
||||
|
||||
jQuery(document).ready(function($){$(window).scroll(function(){var topOfWindow=$(window).scrollTop();console.log('topOfWindow',topOfWindow);if(topOfWindow>100){$("#top-bar").addClass("reduced");}
|
||||
else{$("#top-bar").removeClass("reduced");}});if($('body').is('.categories')){var $diapo=$('<div id="diaporama"></div>');$("#categories-content").before($diapo).children('section.projet-block').each(function(index,el){$(this).addClass('projet-'+index).hover(function(e){$diapo.children().removeClass('visible');var c=$(this).attr('class').match('projet-[0-9]+');console.log("class",c[0]);$diapo.children('.'+c[0]).addClass('visible');}).find('.projet-img').addClass('projet-'+index).appendTo($diapo);});$diapo.children('.projet-img').first().addClass('visible');}
|
||||
else{$("#top-bar").removeClass("reduced");}});if($('body').is('.categories')){console.log('hello')
|
||||
var $diapo=$('<div id="diaporama"></div>');$("#categories-content").before($diapo).find('li.project').each(function(index,el){console.log(index)
|
||||
$(this).addClass('projet-'+index).hover(function(e){$diapo.children().removeClass('visible');var c=$(this).attr('class').match('projet-[0-9]+');console.log("class",c[0]);$diapo.children('.'+c[0]).addClass('visible');}).find('.projet-img').addClass('projet-'+index).appendTo($diapo);});$diapo.children('.projet-img').first().addClass('visible');}
|
||||
var $grid=$('.grid').masonry({itemSelector:'.grid-block'});});
|
||||
@@ -14,10 +14,12 @@ jQuery(document).ready(function($) {
|
||||
|
||||
// init categories content images behaviour
|
||||
if($('body').is('.categories')){
|
||||
console.log('hello')
|
||||
var $diapo = $('<div id="diaporama"></div>');
|
||||
$("#categories-content")
|
||||
.before($diapo)
|
||||
.children('section.projet-block').each(function(index, el) {
|
||||
.find('li.project').each(function(index, el) {
|
||||
console.log(index)
|
||||
$(this)
|
||||
.addClass('projet-'+index)
|
||||
.hover(function (e) {
|
||||
|
||||
Reference in New Issue
Block a user