We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
`<!Doctype html>
.cont { display: flex; justify-content: center; align-items: center; }
.likes {
width: 40px; height: 40px; background: black; color: #fff; display: flex; justify-content: center; align-items: center; transition: background 500ms ease-in-out; border-radius:25px ;
); }
.likes-active { background: #530cd5; } .button { font-size: 16px; color: #252525; background: white; padding: 8px 25px; border-radius: 4px; border: 1px solid #e5e5e5; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.06); transition: background 500ms, color 500ms; transition-timing-function: ease-in-out; margin-left: 20px; }
.button-active { background: #530cd5; color: #fff; } </style>
<script src="like.js">const button = document.querySelector(".button");
const likes = document.querySelector(".likes");
let like = true; let count = likes.textContent;
button.addEventListener("click", () => { count = like ? ++count : --count; like = !like; likes.textContent = count; button.classList.toggle("button-active"); likes.classList.toggle("likes-active"); });</script>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
`<!Doctype html>
<style >body { padding: 40px; font-family: "Oswald", sans-serif; background: #eee; }.cont {
display: flex;
justify-content: center;
align-items: center;
}
.likes {
width: 40px;
height: 40px;
background: black;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
transition: background 500ms ease-in-out;
border-radius:25px ;
);
}
.likes-active {
background: #530cd5;
}
.button {
font-size: 16px;
color: #252525;
background: white;
padding: 8px 25px;
border-radius: 4px;
border: 1px solid #e5e5e5;
text-transform: uppercase;
letter-spacing: 1px;
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.06);
transition: background 500ms, color 500ms;
transition-timing-function: ease-in-out;
margin-left: 20px;
}
.button-active {
background: #530cd5;
color: #fff;
}
</style>
vote
const likes = document.querySelector(".likes");
let like = true;
let count = likes.textContent;
button.addEventListener("click", () => {
`count = like ? ++count : --count;
like = !like;
likes.textContent = count;
button.classList.toggle("button-active");
likes.classList.toggle("likes-active");
});</script>
The text was updated successfully, but these errors were encountered: