Skip to content

Commit 57a9472

Browse files
a
1 parent bb291a1 commit 57a9472

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

public/js/app.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
$(function(){
22

3-
$('.projects').isotope({
3+
$projects = $('#projects');
4+
5+
$projects.isotope({
46
itemSelector: '.project'
57
, animationEngine: 'jquery'
8+
, resizable: false
69
, masonry: {
7-
columnWidth: 100
10+
columnWidth: $projects.width() / 4
811
}, getSortData : {
912
date : function ( $elem ) {
1013
return $elem.attr('data-date');
@@ -16,6 +19,13 @@ $(function(){
1619

1720
}});
1821

22+
$(window).smartresize(function(){
23+
$projects.isotope({
24+
masonry: { columnWidth: $projects.width() / 4 }
25+
});
26+
});
27+
28+
1929
$('#newProject').click(function(){if(!window.username.length) window.location="http://hackdash.hhba.info/auth/twitter"; })
2030

2131
$('.modal').modal({show: false});

0 commit comments

Comments
 (0)