From 5fbd3612414b6b2a03eb1b66e79f299045b9732c Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Thu, 13 Jan 2011 07:59:56 -0500 Subject: [PATCH] #demo -> #container --- _includes/add-buttons.js | 10 +++++----- _includes/layout-change.js | 8 ++++---- _includes/sort-buttons.js | 2 +- _layouts/elements.html | 18 +++++++++--------- _layouts/inf-scroll-page.html | 6 +++--- _posts/demos/2010-12-12-basic.html | 8 ++++---- _posts/demos/2010-12-13-elements-complete.html | 2 +- _posts/demos/2010-12-16-elements-partial.html | 2 +- _posts/demos/2010-12-29-layout-modes.html | 10 +++++----- _posts/demos/2010-12-30-filtering.html | 10 +++++----- _posts/demos/2010-12-30-sorting.html | 8 ++++---- _posts/demos/2010-12-31-relayout.html | 16 ++++++++-------- _posts/demos/2011-01-02-adding-items.html | 8 ++++---- _posts/demos/2011-01-02-infinite-scroll.html | 12 ++++++------ _posts/demos/2011-01-11-images.html | 8 ++++---- _posts/docs/2010-12-06-filtering.mdown | 6 +++--- _posts/docs/2010-12-07-sorting.mdown | 10 +++++----- index.html | 2 +- 18 files changed, 73 insertions(+), 73 deletions(-) diff --git a/_includes/add-buttons.js b/_includes/add-buttons.js index 822b427..23dbd21 100644 --- a/_includes/add-buttons.js +++ b/_includes/add-buttons.js @@ -6,10 +6,10 @@ newEls += fakeElement.create(); } var $newEls = $( newEls ) - // $demo.append( $newEls ).isotope( 'appendToLayout', $newEls ); - $demo.isotope( 'insert', $newEls ); - // $demo.append( $newEls ).isotope( 'addAtoms', $newEls ).isotope(); - // $demo.isotope() + // $container.append( $newEls ).isotope( 'appendToLayout', $newEls ); + $container.isotope( 'insert', $newEls ); + // $container.append( $newEls ).isotope( 'addAtoms', $newEls ).isotope(); + // $container.isotope() // console.log( next ) return false; @@ -22,7 +22,7 @@ newEls += fakeElement.create(); } var $newEls = $( newEls ) - $demo.append( $newEls ).isotope( 'appended', $newEls ); + $container.append( $newEls ).isotope( 'appended', $newEls ); return false; }); \ No newline at end of file diff --git a/_includes/layout-change.js b/_includes/layout-change.js index ffb765c..e473b74 100644 --- a/_includes/layout-change.js +++ b/_includes/layout-change.js @@ -9,15 +9,15 @@ if ( wasHorizontal !== isHorizontal ) { // need to do some clean up for transitions and sizes var style = isHorizontal ? - { height: '80%', width: $demo.width() } : + { height: '80%', width: $container.width() } : { width: 'auto' }; - $demo.addClass('no-transition').css( style ); + $container.addClass('no-transition').css( style ); setTimeout(function(){ - $demo.removeClass('no-transition').isotope({ layoutMode : mode }); + $container.removeClass('no-transition').isotope({ layoutMode : mode }); }, 100 ) } else { // go ahead and apply new layout - $demo.isotope({ layoutMode : mode }); + $container.isotope({ layoutMode : mode }); } diff --git a/_includes/sort-buttons.js b/_includes/sort-buttons.js index ceafb6b..a127bd3 100644 --- a/_includes/sort-buttons.js +++ b/_includes/sort-buttons.js @@ -7,7 +7,7 @@ asc = $this.parents('.sort').hasClass('asc'); // var sortTest = 'sort ' + sortName + ' ' + direction; // console.time( sortTest ); - $demo.isotope({ + $container.isotope({ sortBy : sortName, sortAscending : asc }); diff --git a/_layouts/elements.html b/_layouts/elements.html index 8471d69..c76eec1 100644 --- a/_layouts/elements.html +++ b/_layouts/elements.html @@ -65,10 +65,10 @@ $(function(){ - var $demo = $('#demo'); + var $container = $('#container'); // hacky way of adding random size classes - $demo.find('.element').each(function(){ + $container.find('.element').each(function(){ if ( Math.random() > 0.6 ) { $(this).addClass('width2'); } @@ -80,7 +80,7 @@ // console.log('starting') // console.time('initializeMe'); - $demo.isotope({ + $container.isotope({ itemSelector : '.element', // layoutMode : 'fitRows', masonry : { @@ -126,7 +126,7 @@ filterName = filterName === '.show-all' ? '*' : filterName; // var filterTest = 'filter ' + filterName; // console.time( filterTest ); - $demo.isotope({ filter: filterName }) + $container.isotope({ filter: filterName }) // console.timeEnd( filterTest ); return false; }); @@ -134,16 +134,16 @@ {% include sort-buttons.js %} // change size of clicked element - $demo.find('.element').live('click', function(){ + $container.find('.element').live('click', function(){ $(this).toggleClass('large'); // console.time('relayout'); - $demo.isotope('reLayout'); + $container.isotope('reLayout'); // console.timeEnd('relayout'); }); // toggle variable sizes of all elements $('#toggle-sizes').find('a').click(function(){ - $demo + $container .toggleClass('variable-sizes') .isotope('reLayout'); return false; @@ -154,12 +154,12 @@ {% include add-buttons.js %} $('#shuffle a').click(function(){ - $demo.isotope('shuffle'); + $container.isotope('shuffle'); return false; }); $('#xray').find('a').click(function(){ - $demo.toggleClass('xray'); + $container.toggleClass('xray'); }); diff --git a/_layouts/inf-scroll-page.html b/_layouts/inf-scroll-page.html index 689836c..6d44628 100644 --- a/_layouts/inf-scroll-page.html +++ b/_layouts/inf-scroll-page.html @@ -11,7 +11,7 @@

{{ page.title }}

-
+
{% assign page_position = page.page_position %} {% for element in site.elements_ordered limit:20 offset:page_position %} {% include element-partial.html %} @@ -27,9 +27,9 @@ @@ -24,9 +24,9 @@ related: etc @@ -31,10 +31,10 @@ related: layouts @@ -38,9 +38,9 @@ related: filtering @@ -31,10 +31,10 @@ related: sorting @@ -31,10 +31,10 @@ related: methods @@ -34,9 +34,9 @@ related: methods