Proper show/hide of help sections.

This commit is contained in:
Tom Preston-Werner
2010-07-20 13:29:12 -05:00
parent 69420cb184
commit 5f86d4e983
3 changed files with 18 additions and 10 deletions
@@ -149,11 +149,17 @@ $(function(){
Gollum.prefix(el, format, 'ol')
})
$('#editbar .tab a').click(function() {
$('#editbar .tab.help a').click(function() {
if ($(this).hasClass("open")) {
$(this).removeClass("open")
$('#editbar .sections').slideUp()
} else {
$(this).addClass("open")
if (!$('#editbar .sections .toc .current').get(0)) {
var target = $('#editbar .sections .toc .headers').get(0)
sectionItemClick.call(target)
}
$('#editbar .sections').slideDown()
}
})