diff -r 000000000000 -r d970ebf37754 enmi12/glossaire/_posts/custom-layout-modes/2012-01-03-masonry-column-shift.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/enmi12/glossaire/_posts/custom-layout-modes/2012-01-03-masonry-column-shift.html Wed Nov 06 03:21:17 2013 +0000 @@ -0,0 +1,220 @@ +--- +title: Masonry Column Shift +layout: default +category: custom-layout-modes +--- + + + +
+

Custom layout mode masonryColumnShift. Enabled columns of a Masonry layout to be shifted and not affect other columns. After the size of an item element has changed, you can trigger a special columnShiftOfItem method that will push the column down. This layout only works with item elements that have the same width

+ +{% highlight javascript %} + +var $container = $('#container'); + +$container.isotope({ + itemSelector: '.shifty-item', + layoutMode: 'masonryColumnShift' +}); + +$container.find('.shifty-item').hover( + function() { + $(this).css({ height: "+=100" }); + // note that element is passed in, not jQuery object + $container.isotope( 'shiftColumnOfItem', this ); + }, + function() { + $(this).css({ height: "-=100" }); + $container.isotope( 'shiftColumnOfItem', this ); + } +); + +{% endhighlight %} + +
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + + \ No newline at end of file