release candidate
This commit is contained in:
@@ -15,36 +15,56 @@ jQuery(document).ready(function($) {
|
||||
// init categories content images behaviour
|
||||
// console.log($(window).width());
|
||||
if( $(window).width() > 600 ){
|
||||
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');
|
||||
}
|
||||
// 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');
|
||||
// }
|
||||
|
||||
// init Masonry
|
||||
var $grid = $('.grid').masonry({
|
||||
// init Isotope
|
||||
var $grid = $('.grid').isotope({
|
||||
itemSelector: '.grid-block',
|
||||
transitionDuration: '0.4s'
|
||||
});
|
||||
|
||||
$grid.imagesLoaded().progress(function(){
|
||||
$grid.masonry('layout');
|
||||
// $grid.imagesLoaded().progress(function(){
|
||||
// $grid.masonry('layout');
|
||||
// });
|
||||
|
||||
// filter items on button click
|
||||
$('#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;
|
||||
});
|
||||
|
||||
// init Masonry
|
||||
// var $grid = $('.grid').masonry({
|
||||
// itemSelector: '.grid-block',
|
||||
// transitionDuration: '0.4s'
|
||||
// });
|
||||
//
|
||||
// $grid.imagesLoaded().progress(function(){
|
||||
// $grid.masonry('layout');
|
||||
// });
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user