Skip to content

Commit

Permalink
fixed remove
Browse files Browse the repository at this point in the history
  • Loading branch information
domonik committed Oct 25, 2023
1 parent d0849ef commit d070988
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion assets/js/restylePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ function halloweenTheme(){
var svgElement = svgDocument.querySelector("svg");
svgElement.onclick = function() {
// Remove the SVG element from the DOM
svgElement.parentNode.removeChild(svgElement);
parent = svgElement.parentNode

parent.removeChild(svgElement);
svgObject.remove();

};

const eye1 = svgElement.getElementById('tofill1');
Expand Down Expand Up @@ -155,8 +159,11 @@ function christmasTheme(){
svgElement.onclick = function() {
// Remove the SVG element from the DOM
svgElement.parentNode.removeChild(svgElement);
svgObject.remove();

};


const rect = svgElement.getElementById('reindeerNose');
document.addEventListener('scroll', function() {
rect.style.fill = "#e30613";
Expand Down

0 comments on commit d070988

Please sign in to comment.