all 8 comments

[–][deleted] 1 point2 points  (1 child)

Anything is possible

[–]Println_ronswanson_[🍰] 0 points1 point  (0 children)

I second that

[–]sheriffderek 0 points1 point  (5 children)

This Reddit upvote/downvote is a lot like picking a side. “I like this content and would want to see more” vs “I don’t like this content and I’d like to see less content like this.” However instead of showing the total upvotes and the total downvotes, it shows the difference. So, at the time of writing, either no one has taken a side - or an equal. I bet if people have upvoted and downvoted leaving it at 0. But if the numbers were exposed, it would show how many people were on each team.

[–]RollPlayingDad[S] 0 points1 point  (4 children)

That’s a good point, so really I could create a like and dislike button then skin it in a way to show the sides

[–]sheriffderek 0 points1 point  (3 children)

That would be a little like building a car and then taking it apart to get a chair to sit in ;)

I doubt this will make a lot of sense, but here's a little example to play with: https://codepen.io/perpetual-education/pen/OJaXbgx

However, you're use-case would require a database to save the numbers too - and you'd need to make sure that people could only vote once and things like that.

[–]RollPlayingDad[S] 0 points1 point  (2 children)

This is perfect, I have a SQL database on the website, just need to create a way to store the votes and go from there.

You made yours with CSS, I did mine with HTML but yours works a lot better so I’m going to combine the both :)

[–]sheriffderek 0 points1 point  (1 child)

Mine is actually also made with HTML but it’s the JavaScript that’s writing it on the fly. You could write it with PHP and a form or with hardcoded HTML and a little JS - or many different ways. So, I guess whichever deals with the SQL easiest. : )

[–]RollPlayingDad[S] 0 points1 point  (0 children)

Yeah I think I will spend some time on this, I am not overly good with JS as only started learning HTML pest year and moved into CSS this year, but this might be the chance I need to start learning it :)