MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / move

Function move

assets/js/Navigation.js:1–66  ·  view source on GitHub ↗
(id, position, color)

Source from the content-addressed store, hash-verified

1function move(id, position, color) {
2 var tl = gsap.timeline();
3 tl.to("#bgBubble", { duration: 0.15, bottom: "-30px", ease: "ease-out" }, 0)
4 .to(
5 "#bubble1",
6 { duration: 0.1, y: "120%", boxShadow: "none", ease: "ease-out" },
7 0
8 )
9 .to(
10 "#bubble2",
11 { duration: 0.1, y: "120%", boxShadow: "none", ease: "ease-out" },
12 0
13 )
14 .to(
15 "#bubble3",
16 { duration: 0.1, y: "120%", boxShadow: "none", ease: "ease-out" },
17 0
18 )
19 .to(
20 "#bubble4",
21 { duration: 0.1, y: "120%", boxShadow: "none", ease: "ease-out" },
22 0
23 )
24 .to(".icon", { duration: 0.05, opacity: 0, ease: "ease-out" }, 0)
25 .to(
26 "#bgBubble",
27 { duration: 0.2, left: position, ease: "ease-in-out" },
28 0.1
29 )
30 .to(
31 "#bgBubble",
32 { duration: 0.15, bottom: "-50px", ease: "ease-out" },
33 "-=0.2"
34 )
35 .to(
36 `#bubble${id}`,
37 {
38 duration: 0.15,
39 y: "0%",
40 opacity: 1,
41 boxShadow: "0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)",
42 ease: "ease-out",
43 },
44 "-=0.1"
45 )
46 .to(
47 `#bubble${id}> span`,
48 { duration: 0.15, y: "0%", opacity: 0.7, ease: "ease-out" },
49 "-=0.1"
50 )
51 .to(
52 "#navbarContainer",
53 { duration: 0.3, backgroundColor: color, ease: "ease-in-out" },
54 0
55 )
56 .to(
57 "#bg",
58 { duration: 0.3, backgroundColor: color, ease: "ease-in-out" },
59 0
60 )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected