Exporting to glitchdotcom/glitch-hello-website
./script.js:31317407/1858
This commit is contained in:
@ -13,10 +13,12 @@ Make the "Click me!" button rotate when the visitor clicks it:
|
||||
*/
|
||||
const btn = document.querySelector("button"); // Get the button from the page
|
||||
// Detect clicks on the button
|
||||
if (btn) {
|
||||
btn.onclick = function() {
|
||||
// The JS works in conjunction with the 'rotated' code in style.css
|
||||
btn.classList.toggle('rotated');
|
||||
btn.classList.toggle("rotated");
|
||||
};
|
||||
}
|
||||
|
||||
// This is a single line JS comment
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user