Hacker News new | ask | show | jobs
by harlanlewis 3746 days ago
This won't save any votes, but:

input, input:checked ~ label { display: none; }

---

<input type="radio" id="up">

<input type="radio" id="down">

<label for="up" class="show">Up</label>

<label for="down" class="hide">Down</label>

1 comments

And if you wrap that inside a form that submit this to a url that respond with status 204, this will work without any js :-)
Amazing. I've been doing web stuff for the past decade, and had no idea you could do this.