Skip to content

Commit ca75013

Browse files
committed
Update DOM - Show anchors.js
1 parent df564f7 commit ca75013

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javascripts/DOM - Show anchors.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ var i, anchor, name;
33
var anchors = document.anchors;
44
for (i = 0; i < anchors.length; i += 1) {
55
anchor = anchors[i];
6-
name = anchor.name;
7-
if (name !== undefined && name.length > 0) {
8-
anchor.appendChild(document.createTextNode("#" + name));
6+
id = anchor.id;
7+
if (id !== undefined && id.length > 0) {
8+
anchor.appendChild(document.createTextNode("#" + id));
99
}
1010
}

0 commit comments

Comments
 (0)