mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
godoc/static: clean up the expandos code that handles the hash
Change-Id: I14e6777f781253a574f76c7d8a345d248b5a4306 Reviewed-on: https://go-review.googlesource.com/36320 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
7e08f6711b
commit
1a60337c22
@ -245,9 +245,15 @@ function fixFocus() {
|
||||
}
|
||||
|
||||
function toggleHash() {
|
||||
var id = window.location.hash.substring(1);
|
||||
// Open all of the toggles for a particular hash.
|
||||
var els = $(document.getElementById(window.location.hash.substring(1)),
|
||||
$.find("a[name='" + window.location.hash.substring(1) + "']"));
|
||||
var els = $(
|
||||
document.getElementById(id),
|
||||
$('a[name]').filter(function() {
|
||||
return $(this).attr('name') == id;
|
||||
})
|
||||
);
|
||||
|
||||
while (els.length) {
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
var el = $(els[i]);
|
||||
|
@ -815,9 +815,15 @@ function fixFocus() {
|
||||
}
|
||||
|
||||
function toggleHash() {
|
||||
var id = window.location.hash.substring(1);
|
||||
// Open all of the toggles for a particular hash.
|
||||
var els = $(document.getElementById(window.location.hash.substring(1)),
|
||||
$("a[name='" + window.location.hash.substring(1) + "']"));
|
||||
var els = $(
|
||||
document.getElementById(id),
|
||||
$('a[name]').filter(function() {
|
||||
return $(this).attr('name') == id;
|
||||
})
|
||||
);
|
||||
|
||||
while (els.length) {
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
var el = $(els[i]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user