Skip to content

Commit

Permalink
fixd remove reindeer
Browse files Browse the repository at this point in the history
  • Loading branch information
domonik committed Oct 24, 2023
1 parent 54a1137 commit 58f593c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions assets/js/restylePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,20 @@ function christmasTheme(){
// Access and manipulate elements in the SVG
if (svgDocument) {
var svgElement = svgDocument.querySelector("svg");
svgElement.onclick = function() {
// Remove the SVG element from the DOM
svgElement.parentNode.removeChild(svgElement);
};

const rect = svgElement.getElementById('reindeerNose');
document.addEventListener('scroll', function() {
rect.style.fill = "#e30613";
rect.style.stroke = "#e30613"
rect.style.strokeWidth = 1;
clearTimeout(scrollTimeout);
scrollTimeout = setTimeout(function() {
rect.style.fill = '#4e3824';
rect.style.stroke = "none"
rect.style.fill = '#4e3824';
rect.style.stroke = "none"


}, 200);
Expand Down

0 comments on commit 58f593c

Please sign in to comment.