Fixed rendering of userguide; api category menu and input box

This commit is contained in:
Deon George
2016-05-02 16:29:47 +10:00
parent 53873600c1
commit 0a7e8b349d
2 changed files with 36 additions and 1 deletions

View File

@@ -32,6 +32,41 @@ $(document).ready(function()
});
});
// Collapsing menus
$('#kodoc-topics li:has(li)').each(function()
{
var $this = $(this);
var toggle = $('<span class="toggle"></span>');
var menu = $this.find('>ul,>ol');
toggle.click(function()
{
if (menu.is(':visible'))
{
menu.stop(true, true).slideUp('fast');
toggle.html('+');
}
else
{
menu.stop(true, true).slideDown('fast');
toggle.html('&ndash;');
}
});
$this.find('>span').click(function()
{
// Menu without a link
toggle.click();
});
if ( ! $this.is(':has(a.current)'))
{
menu.hide();
}
toggle.html(menu.is(':visible') ? '&ndash;' : '+').prependTo($this);
});
// Show source links
$('#kodoc-main .method-source').each(function()