From 33cd41155c05ebfa2b161c2bdd1c6a9a65fbcf44 Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Wed, 4 Jan 2012 08:20:49 -0500 Subject: [PATCH] add masonry column shift layout mode --- .../2012-01-03-masonry-column-shift.html | 220 ++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 _posts/custom-layout-modes/2012-01-03-masonry-column-shift.html diff --git a/_posts/custom-layout-modes/2012-01-03-masonry-column-shift.html b/_posts/custom-layout-modes/2012-01-03-masonry-column-shift.html new file mode 100644 index 0000000..d5b2c52 --- /dev/null +++ b/_posts/custom-layout-modes/2012-01-03-masonry-column-shift.html @@ -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.

+ +{% 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