4,456
edits
No edit summary |
No edit summary |
||
Line 622: | Line 622: | ||
}); | }); | ||
// NEW TEST | |||
// Initially hide all sections except the default one | |||
$('.home-list-view > div, .home-block-view > div').hide(); | |||
$('.chronicle-block').show(); | |||
// Handle View Buttons | |||
$('.list-view-button').click(function() { | |||
$('.home-block-view').hide(); | |||
$('.home-list-view').show(); | |||
$('.home-list-view > div').hide(); | |||
$('.chronicle-list').show(); | |||
}); | |||
$('.block-view-button').click(function() { | |||
$('.home-list-view').hide(); | |||
$('.home-block-view').show(); | |||
$('.home-block-view > div').hide(); | |||
$('.chronicle-block').show(); | |||
}); | |||
// Handle List Sorting Buttons | |||
$('.chronicle-list-button').click(function() { | |||
$('.home-list-view > div').hide(); | |||
$('.chronicle-list').show(); | |||
}); | |||
$('.random-list-button').click(function() { | |||
$('.home-list-view > div').hide(); | |||
$('.random-list').show(); | |||
}); | |||
$('.alphabetical-list-button').click(function() { | |||
$('.home-list-view > div').hide(); | |||
$('.alphabetical-list').show(); | |||
}); | |||
// Handle Block Sorting Buttons | |||
$('.chronicle-block-button').click(function() { | |||
$('.home-block-view > div').hide(); | |||
$('.chronicle-block').show(); | |||
}); | |||
$('.random-block-button').click(function() { | |||
$('.home-block-view > div').hide(); | |||
$('.random-block').show(); | |||
}); | |||
$('.alphabetical-block-button').click(function() { | |||
$('.home-block-view > div').hide(); | |||
$('.alphabetical-block').show(); | |||
}); | |||
}); | }); |