@xiee/utils
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -33,3 +33,4 @@ ((d) => { | ||
let li = lis[i], hash = 'faq-' + (id ? id + '-' : '') + (i + 1); | ||
li.firstElementChild.innerHTML += ' <span class="anchor" id="' + hash + | ||
let p = li.firstElementChild; | ||
p.innerHTML += ' <span class="anchor" id="' + hash + | ||
'"><a href="#' + hash + '">#</a></span>'; | ||
@@ -40,4 +41,4 @@ if (location.hash === '#' + hash) { | ||
} | ||
li.onclick = function(e) { | ||
this.classList.toggle(cls_clicked); | ||
p.onclick = function(e) { | ||
li.classList.toggle(cls_clicked); | ||
}; | ||
@@ -44,0 +45,0 @@ } |
{ | ||
"name": "@xiee/utils", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Miscellaneous tools and utilities to manipulate HTML pages", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -48,3 +48,4 @@ This repo contains miscellaneous tools and utilities written in JavaScript. They | ||
Note that you will need to load `faq.css` accordingly. | ||
Note that you will need to load `faq.css` accordingly. See [a more detailed | ||
introduction here](https://yihui.org/en/2021/10/faq-list/). | ||
@@ -51,0 +52,0 @@ ## fix-footnote.js |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11472
219
82