Skip to content

Commit

Permalink
将定义解释器代码上传
Browse files Browse the repository at this point in the history
半成品
  • Loading branch information
qndm committed Feb 12, 2025
1 parent d4d2305 commit cf11a8a
Show file tree
Hide file tree
Showing 7 changed files with 2,355 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/_assets/anchorParser.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
gsap.registerPlugin(ScrollToPlugin);
function jump() {
const hash = /.+#(.+)/.exec(location.href)[1];
const hash = location.hash.substring(1);
const el =
[...document.querySelectorAll("[anchor]")].find(
(e) => e.getAttribute("anchor").trim() == hash
(e) => e.getAttribute("anchor").trim() === hash
) ||
[...document.querySelectorAll("*")].find(
(e) => e.id && e.id.trim() == hash
(e) => e.id && e.id.trim() === hash
);
if (el) {
const timeline = gsap.timeline();
Expand Down
Loading

0 comments on commit cf11a8a

Please sign in to comment.