fixed sidebar columnization

This commit is contained in:
Brandon Mathis 2011-07-13 11:57:44 -04:00
parent eba8e7f5f7
commit b0a610095f
2 changed files with 18 additions and 13 deletions

View file

@ -21,14 +21,16 @@ function addSidebarToggler() {
}
});
sections = $('aside[role=sidebar] > section')
if(sections.length > 1){
sections.each(function(section, index){
if ((sections.length >= 3) && index % 3 == 0) {
$(section).addClass("first");
}
count = ((index +1) % 2) ? "odd" : "even";
$(section).addClass(count);
});
}
if(sections.length >= 3){ $('aside[role=sidebar]').addClass('thirds') }
sections.each(function(section, index){
if ((sections.length >= 3) && index % 3 == 0) {
$(section).addClass("first");
}
count = ((index +1) % 2) ? "odd" : "even";
$(section).addClass(count);
});
}
function testFeatures() {
var features = ['maskImage'];