summaryrefslogtreecommitdiffstats
path: root/src/navtree_js.h
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2011-11-17 21:22:48 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2011-11-17 21:22:48 (GMT)
commit720d85edd0316e1cedec3402e204ce418174305d (patch)
tree0c7c3ab3d6f38e212b2cd4a4628e3c9d32d49db3 /src/navtree_js.h
parent8491e9fbd06ef8a8f1cc542a524c673d7781d4b6 (diff)
downloadDoxygen-720d85edd0316e1cedec3402e204ce418174305d.zip
Doxygen-720d85edd0316e1cedec3402e204ce418174305d.tar.gz
Doxygen-720d85edd0316e1cedec3402e204ce418174305d.tar.bz2
Release-1.7.5.1-20111117
Diffstat (limited to 'src/navtree_js.h')
-rw-r--r--src/navtree_js.h36
1 files changed, 32 insertions, 4 deletions
diff --git a/src/navtree_js.h b/src/navtree_js.h
index 6456eb6..2ad1fc1 100644
--- a/src/navtree_js.h
+++ b/src/navtree_js.h
@@ -149,14 +149,12 @@
" $(a).parent().parent().addClass('selected');\n"
" $(a).parent().parent().attr('id','selected');\n"
" var anchor = $(aname);\n"
-" var targetDiv = anchor.next();\n"
-" $(targetDiv).children('.memproto,.memdoc').effect(\"highlight\",{},3000);\n"
" $(\"#doc-content\").animate({\n"
" scrollTop: anchor.position().top +\n"
" $('#doc-content').scrollTop() -\n"
" $('#doc-content').offset().top\n"
" },500,function(){\n"
-" $(location).attr('href',aname);\n"
+" window.location.replace(aname);\n"
" });\n"
" };\n"
" }\n"
@@ -308,7 +306,7 @@
" var anchor = $($(location).attr('hash'));\n"
" var targetDiv = anchor.next();\n"
" $(targetDiv).children('.memproto,.memdoc').\n"
-" effect(\"highlight\", {}, 3000);\n"
+" effect(\"highlight\", {}, 1500);\n"
" }\n"
" else\n"
" {\n"
@@ -363,6 +361,36 @@
" }\n"
" },true);\n"
"\n"
+" $(window).bind('hashchange', function(){\n"
+" if (window.location.hash && window.location.hash.length>1){\n"
+" var anchor = $(window.location.hash);\n"
+" var targetDiv = anchor.next();\n"
+" $(targetDiv).children('.memproto,.memdoc').effect(\"highlight\",{},1500);\n"
+" var docContent = $('#doc-content');\n"
+" if (docContent && anchor && anchor[0] && anchor[0].ownerDocument){\n"
+" docContent.scrollTop(anchor.position().top+docContent.scrollTop()-docContent.offset().top);\n"
+" }\n"
+" var a;\n"
+" if ($(location).attr('hash')){\n"
+" var link=stripPath($(location).attr('pathname'))+':'+\n"
+" $(location).attr('hash').substring(1);\n"
+" a=$('.item a[class*=\\\"\"'+link+'\"\\\"]');\n"
+" }\n"
+" if (a && a.length){\n"
+" $('.item').removeClass('selected');\n"
+" $('.item').removeAttr('id');\n"
+" a.parent().parent().addClass('selected');\n"
+" a.parent().parent().attr('id','selected');\n"
+" var anchor = $($(location).attr('hash'));\n"
+" var targetDiv = anchor.next();\n"
+" showRoot();\n"
+" }\n"
+" } else {\n"
+" var docContent = $('#doc-content');\n"
+" if (docContent){ docContent.scrollTop(0); }\n"
+" }\n"
+" })\n"
+"\n"
" $(window).load(showRoot);\n"
"}\n"
"\n"