diff --git a/_layouts/elements.html b/_layouts/elements.html
index 22a8ee1..94bf14a 100644
--- a/_layouts/elements.html
+++ b/_layouts/elements.html
@@ -65,9 +65,12 @@
Layouts
Etc
@@ -117,7 +120,7 @@
console.time('initializeMe');
$demo.ionize({
itemSelector : '.element',
- layoutMode : '{% for layout in page.layout_options limit:1 %}{{ layout }}{% endfor %}',
+ // layoutMode : 'clearFloat',
masonry : {
columnWidth : 120
},
@@ -197,11 +200,27 @@
return false;
});
+ var isHorizontal = false;
// change layout
$('#layouts a').click(function(){
var mode = $(this).attr('href').slice(1);
- $demo.ionize({ layoutMode : mode });
+ wasHorizontal = isHorizontal;
+ isHorizontal = $(this).hasClass('horizontal');
+
+ if ( wasHorizontal !== isHorizontal ) {
+ // need to do some clean up for transitions and sizes
+ var style = isHorizontal ? { height: '80%' } : { width: 'auto' };
+ $demo.addClass('no-transition').css( style );
+ setTimeout(function(){
+ $demo.removeClass('no-transition').ionize({ layoutMode : mode });
+ }, 1 )
+ } else {
+ // go ahead and apply new layout
+ $demo.ionize({ layoutMode : mode });
+
+ }
+
return false;
});
diff --git a/_posts/examples/2010-12-19-elements-partial-horizontal.html b/_posts/examples/2010-12-19-elements-partial-horizontal.html
deleted file mode 100644
index cb607da..0000000
--- a/_posts/examples/2010-12-19-elements-partial-horizontal.html
+++ /dev/null
@@ -1,16 +0,0 @@
----
-title: Elements Partial Horizontal
-layout: elements
-category: examples
-body_class: horizontal
-layout_options: [ masonryHorizontal, fitColumns, cellsByColumn ]
----
-
-
-
- {% for element in site.elements_partial %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
diff --git a/css/style.css b/css/style.css
index 1b98b41..67f07c6 100644
--- a/css/style.css
+++ b/css/style.css
@@ -161,6 +161,15 @@ a {
}
+.wrap.ionize.no-transition,
+.ionize.no-transition .element {
+ -webkit-transition-duration: 0s;
+ -moz-transition-duration: 0s;
+/* -o-transition-duration: 0s;*/
+ transition-duration: 0s;
+
+}
+
.wrap.ionize {
-webkit-transition-property: height, width;
-moz-transition-property: height, width;
@@ -189,7 +198,7 @@ a {
/**** Horizontal ****/
-.horizontal #options {
+/*.horizontal #options {
width: 300px;
position: absolute;
left: 20px;
@@ -201,4 +210,8 @@ a {
position: relative;
margin-left: 340px;
top: 20px;
+}*/
+
+.horizontal .wrap {
+ height: 80%;
}
\ No newline at end of file