Skip to content
New issue

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

Vote #2363

Closed
sifat077 opened this issue Jan 8, 2023 · 0 comments
Closed

Vote #2363

sifat077 opened this issue Jan 8, 2023 · 0 comments

Comments

@sifat077
Copy link

sifat077 commented Jan 8, 2023

`<!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>


0

vote

 <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>

`
@jonrohan jonrohan closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants