Skip to content

Commit b7df007

Browse files
author
Rand McKinney
committed
JS not needed for scroll to top with CAI styling
1 parent 2be50cb commit b7df007

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

js/cai-customscripts.js

-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
window.onload=function() {
22

3-
// Scroll-to-top button
4-
const top_scroll_buttons = document.getElementsByClassName("top-scroll-btn");
5-
for (let i = 0; i < top_scroll_buttons.length; i++) {
6-
// When the user clicks on the button, scroll to the top of the document
7-
top_scroll_buttons[i].addEventListener("click", function() {
8-
console.log("top_scroll_button clicked!")
9-
window.scrollTo(0, 0);
10-
});
11-
}
12-
133
all_property_desc = document.getElementsByClassName("prop_desc")
144

155
//for (let i = 0; i < all_property_desc.length; i++) {

pages/reference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
{% for term in schema.definitions %}
8282

8383
{% if include.layout=="cai" %}
84-
<button class="top-scroll-btn" title="Go to top">Scroll To Top</button>
84+
<a class="top-scroll-btn" title="Go to top" href="#manifeststore">Scroll To Top</a>
8585
{% endif %}
8686

8787
### {{term.first}}

0 commit comments

Comments
 (0)