Fossil SCM

Use regular comments in Javascript files, instead of comments private to the mkbuiltin utility, so the files are easier to reuse and test outside of Fossil, and easier to process with synatx highlighting-enabled text editors.

florian 2020-04-05 14:30 accordion-experiments
Commit 04f232aaaeb0fea8c9eae914ca230b0555eecdb760c57b9c617970a0b1b74b9b
1 file changed +3 -3
--- src/accordion.js
+++ src/accordion.js
@@ -1,8 +1,8 @@
1
-# Attach appropriate javascript to each ".accordion" button so that
2
-# it expands and contracts when clicked.
3
-#
1
+/* Attach appropriate javascript to each ".accordion" button so that
2
+** it expands and contracts when clicked.
3
+*/
44
var a = document.getElementsByClassName("accordion");
55
for(var i=0; i<a.length; i++){
66
var p = a[i].nextElementSibling;
77
p.style.maxHeight = p.scrollHeight + "px";
88
a[i].addEventListener("click",function(){
99
--- src/accordion.js
+++ src/accordion.js
@@ -1,8 +1,8 @@
1 # Attach appropriate javascript to each ".accordion" button so that
2 # it expands and contracts when clicked.
3 #
4 var a = document.getElementsByClassName("accordion");
5 for(var i=0; i<a.length; i++){
6 var p = a[i].nextElementSibling;
7 p.style.maxHeight = p.scrollHeight + "px";
8 a[i].addEventListener("click",function(){
9
--- src/accordion.js
+++ src/accordion.js
@@ -1,8 +1,8 @@
1 /* Attach appropriate javascript to each ".accordion" button so that
2 ** it expands and contracts when clicked.
3 */
4 var a = document.getElementsByClassName("accordion");
5 for(var i=0; i<a.length; i++){
6 var p = a[i].nextElementSibling;
7 p.style.maxHeight = p.scrollHeight + "px";
8 a[i].addEventListener("click",function(){
9

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button