Skip to content

Commit

Permalink
Create cursor-switch-logic.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Do-Not-Dusturb authored Feb 15, 2025
1 parent bc75036 commit 47ceb58
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions JS/cursor-switch-logic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function changeCursor(cursorStyle) {
const existingScript = document.getElementById('cursor-script');
if (existingScript) {
existingScript.remove();
}

const script = document.createElement('script');
script.id = 'cursor-script';
script.src = `JS/custom-cursor-${cursorStyle}.js`;
document.body.appendChild(script);
}

0 comments on commit 47ceb58

Please sign in to comment.