Browse Source

docs : index.html - bind click before page load

pull/14/head
David DeSandro 14 years ago
parent
commit
871ad08261
  1. 54
      index.html

54
index.html

@ -97,9 +97,35 @@ layout: nil
<script src="js/jquery-1.4.4.min.js"></script> <script src="js/jquery-1.4.4.min.js"></script>
<script src="{{ site.isotope_js }}"></script> <script src="{{ site.isotope_js }}"></script>
<script> <script>
$(function(){
$list = $('#super-list'); $list = $('#super-list');
$('#filter a').click(function(){
var filterName = $(this).attr('data-filter');
$list.isotope({ filter : filterName });
return false;
});
$('#sort a').click(function(){
var sortName = $(this).attr('data-sort');
$list.isotope({ sortBy : sortName });
return false;
});
var currentLayout = 'fitRows';
$('#layouts a').click(function(){
var layoutName = $(this).attr('href').slice(1);
$list.removeClass( currentLayout ).addClass( layoutName );
currentLayout = layoutName;
$list.isotope({ layoutMode : layoutName });
return false;
});
{% include option-buttons.js %}
$(function(){
$list.isotope({ $list.isotope({
layoutMode : 'fitRows', layoutMode : 'fitRows',
@ -116,30 +142,6 @@ layout: nil
} }
}); });
$('#filter a').click(function(){
var filterName = $(this).attr('data-filter');
$list.isotope({ filter : filterName });
return false;
});
$('#sort a').click(function(){
var sortName = $(this).attr('data-sort');
$list.isotope({ sortBy : sortName });
return false;
});
var currentLayout = 'fitRows';
$('#layouts a').click(function(){
var layoutName = $(this).attr('href').slice(1);
$list.removeClass( currentLayout ).addClass( layoutName );
currentLayout = layoutName;
$list.isotope({ layoutMode : layoutName });
return false;
});
{% include option-buttons.js %}
}); });
</script> </script>

Loading…
Cancel
Save