Skip to content

Commit

Permalink
Added Script.js Successfully! 🤑🔰
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockNotes-4515 authored May 23, 2024
1 parent a215b52 commit 9fe978e
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
var active = 3;

var mncircles = document.querySelectorAll(".mncircle");
var sec = document.querySelectorAll(".sec");

gsap.to(mncircles[active-1], {
opacity: .5,
})

gsap.to(sec[active-1], {
opacity: 1,
})

mncircles.forEach(function(val, index) {
val.addEventListener("click", function() {
gsap.to("#circle" , {
rotate: (3-(index+1))*10,
ease: Expo.easeInOut,
duration: 1,
})
greyout();
gsap.to(this, {
opacity: .5
})
gsap.to(sec[index], {
opacity: 1
})
})
})

function greyout(){
gsap.to(mncircles, {
opacity: .08
})
gsap.to(sec, {
opacity: .4
});
}

gsap.to("#circle", {
rotate: 0,
ease: Expo.easeInOut,
duration:2,

})

0 comments on commit 9fe978e

Please sign in to comment.