diff --git a/docs/branding/footer.html.in b/docs/branding/footer.html.in index 93c1ae4..b27cba9 100644 --- a/docs/branding/footer.html.in +++ b/docs/branding/footer.html.in @@ -7,7 +7,7 @@ $(function () { $("#toc").click(function(event) { // This to ensure clicks in the #toc don't make it up to the - // `closeTocOnBodyClick` handler. + // button handler. event.stopPropagation(); }); $("#toc a").click(function(event) { @@ -26,6 +26,28 @@ $(function () { target.slideToggle(100); event.stopPropagation(); }); + + $("#api").click(function(event) { + // This to ensure clicks in the #api don't make it up to the + // button handler. + event.stopPropagation(); + }); + $("#api a").click(function(event) { + $("#apibutton").click(); + }) + $("#apibutton").click(function() { + var target = $("#api"); + if (target.css("display") !== "block") { + $("body").bind("click.apiCloser", function(event) { + $("#apibutton").click(); + event.stopPropagation(); + }); + } else { + $("body").unbind("click.apiCloser"); + } + target.slideToggle(100); + event.stopPropagation(); + }); }); diff --git a/docs/branding/header.html.in b/docs/branding/header.html.in index db9ab8c..b1bc535 100644 --- a/docs/branding/header.html.in +++ b/docs/branding/header.html.in @@ -24,14 +24,32 @@