Browse Source

docs : remove console.logs

pull/14/head
David DeSandro 14 years ago
parent
commit
661945c728
  1. 5
      _includes/add-buttons.js
  2. 3
      _includes/sort-buttons.js
  3. 9
      _layouts/elements.html

5
_includes/add-buttons.js

@ -1,16 +1,11 @@
$('#insert a').click(function(){ $('#insert a').click(function(){
var i = Math.ceil( Math.random()*3 + 1 ), var i = Math.ceil( Math.random()*3 + 1 ),
newEls = ''; newEls = '';
// window.console && console.log( i )
while ( i-- ) { while ( i-- ) {
newEls += fakeElement.create(); newEls += fakeElement.create();
} }
var $newEls = $( newEls ) var $newEls = $( newEls )
// $container.append( $newEls ).isotope( 'appendToLayout', $newEls );
$container.isotope( 'insert', $newEls ); $container.isotope( 'insert', $newEls );
// $container.append( $newEls ).isotope( 'addAtoms', $newEls ).isotope();
// $container.isotope()
// console.log( next )
return false; return false;
}); });

3
_includes/sort-buttons.js

@ -5,12 +5,9 @@
var $this = $(this), var $this = $(this),
sortName = $this.attr('href').slice(1), sortName = $this.attr('href').slice(1),
asc = $this.parents('.sort').hasClass('asc'); asc = $this.parents('.sort').hasClass('asc');
// var sortTest = 'sort ' + sortName + ' ' + direction;
// console.time( sortTest );
$container.isotope({ $container.isotope({
sortBy : sortName, sortBy : sortName,
sortAscending : asc sortAscending : asc
}); });
// console.timeEnd( sortTest );
return false; return false;
}); });

9
_layouts/elements.html

@ -44,6 +44,7 @@
{{ content }} {{ content }}
{% include footer.html %}
<script src="../js/jquery-1.4.4.min.js"></script> <script src="../js/jquery-1.4.4.min.js"></script>
<script src="../jquery.isotope.js"></script> <script src="../jquery.isotope.js"></script>
@ -66,8 +67,6 @@
}); });
// console.log('starting')
// console.time('initializeMe');
$container.isotope({ $container.isotope({
itemSelector : '.element', itemSelector : '.element',
// layoutMode : 'fitRows', // layoutMode : 'fitRows',
@ -105,17 +104,13 @@
} }
} }
}); });
// console.timeEnd('initializeMe');
$('#filters').find('a').click(function(){ $('#filters').find('a').click(function(){
// get href attribute, minus the #, plus a . to make it a class // get href attribute, minus the #, plus a . to make it a class
var filterName = '.' + $(this).attr('href').slice(1); var filterName = '.' + $(this).attr('href').slice(1);
filterName = filterName === '.show-all' ? '*' : filterName; filterName = filterName === '.show-all' ? '*' : filterName;
// var filterTest = 'filter ' + filterName;
// console.time( filterTest );
$container.isotope({ filter: filterName }) $container.isotope({ filter: filterName })
// console.timeEnd( filterTest );
return false; return false;
}); });
@ -124,9 +119,7 @@
// change size of clicked element // change size of clicked element
$container.find('.element').live('click', function(){ $container.find('.element').live('click', function(){
$(this).toggleClass('large'); $(this).toggleClass('large');
// console.time('relayout');
$container.isotope('reLayout'); $container.isotope('reLayout');
// console.timeEnd('relayout');
}); });
// toggle variable sizes of all elements // toggle variable sizes of all elements

Loading…
Cancel
Save