Release Candidate 0.1
This commit is contained in:
@@ -1,8 +1,31 @@
|
||||
jQuery(document).ready(function($) {
|
||||
|
||||
// init categories content images behaviour
|
||||
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');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// init Masonry
|
||||
var $grid = $('.grid').masonry({
|
||||
itemSelector: '.projet'
|
||||
itemSelector: '.grid-block'
|
||||
// columnWidth: 200
|
||||
});
|
||||
// layout Masonry after each image loads
|
||||
@@ -11,4 +34,5 @@ jQuery(document).ready(function($) {
|
||||
// });
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user