[release-branch.go1.7] static: don't use the jQuery func for looking up based on hash
$.find is safer. Change-Id: I51893b64ce804ac5a70f780a1255af2c91413110 Reviewed-on: https://go-review.googlesource.com/35430 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-on: https://go-review.googlesource.com/35431 Reviewed-by: Chris Broadfoot <cbro@golang.org>
This commit is contained in:
parent
ae17563914
commit
6220cba641
|
@ -247,7 +247,7 @@ function fixFocus() {
|
||||||
function toggleHash() {
|
function toggleHash() {
|
||||||
// Open all of the toggles for a particular hash.
|
// Open all of the toggles for a particular hash.
|
||||||
var els = $(document.getElementById(window.location.hash.substring(1)),
|
var els = $(document.getElementById(window.location.hash.substring(1)),
|
||||||
$("a[name='" + window.location.hash.substring(1) + "']"));
|
$.find("a[name='" + window.location.hash.substring(1) + "']"));
|
||||||
while (els.length) {
|
while (els.length) {
|
||||||
for (var i = 0; i < els.length; i++) {
|
for (var i = 0; i < els.length; i++) {
|
||||||
var el = $(els[i]);
|
var el = $(els[i]);
|
||||||
|
|
Loading…
Reference in New Issue