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 @@