From f90a787e478c855beddcb3a626177fa11fb9244b Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 3 Aug 2013 12:04:46 +0200 Subject: Delayed expanding the HTML navigation tree until after the page has loaded --- src/navtree.js | 4 +++- src/navtree_js.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/navtree.js b/src/navtree.js index 3d8134a..1a46df4 100644 --- a/src/navtree.js +++ b/src/navtree.js @@ -464,7 +464,9 @@ function initNavTree(toroot,relpath) navSync.click(function(){ toggleSyncButton(relpath); }); } - navTo(o,toroot,window.location.hash,relpath); + $(window).load(function(){ + navTo(o,toroot,window.location.hash,relpath); + }); $(window).bind('hashchange', function(){ if (window.location.hash && window.location.hash.length>1){ diff --git a/src/navtree_js.h b/src/navtree_js.h index 2e4df6a..1ad83d3 100644 --- a/src/navtree_js.h +++ b/src/navtree_js.h @@ -464,7 +464,9 @@ " navSync.click(function(){ toggleSyncButton(relpath); });\n" " }\n" "\n" -" navTo(o,toroot,window.location.hash,relpath);\n" +" $(window).load(function(){\n" +" navTo(o,toroot,window.location.hash,relpath);\n" +" });\n" "\n" " $(window).bind('hashchange', function(){\n" " if (window.location.hash && window.location.hash.length>1){\n" -- cgit v0.12