Make the accordian expand 'Week 1' by default

This fixes the regression from javascript rewrite.
This commit is contained in:
Prem Sichanugrist
2012-05-07 18:28:52 -04:00
parent 48e2116c25
commit a0ecbca080
4 changed files with 46 additions and 19 deletions

View File

@@ -52,11 +52,12 @@
function Navigation() {}
Navigation.bind = function() {
var navigation;
var active, navigation;
if ($('#accordion').length) {
navigation = new Navigation;
active = $('#accordion ul:has(li.active)').index('#accordion ul');
$('#accordion').bind('accordionchange', navigation.log).accordion({
active: $('#accordion ul:has(li.active)').index('#accordion ul'),
active: active >= 0 ? active : 1,
header: 'h3',
autoHeight: false
});