I want to find a way to create a leaderboard like one below that uses variables to hold Users Points on Javascript in order to respond to changes to those points with changing users Ranks...
Here is what I'm trying to achieve:
I just want to manually fill in User's Points Data using only Javascript Variables... all the Data would come from a javascript array.
Something like :
user_1 = Nilesh S;
user_2 = Shristi_S;
user_1 points = 1710;
user_2 points = 1710;
etc...
Obviously, If I change Nilesh S (user_1) points to 1000 then Nilesh S rank will be 10th...
What I achieved for now is just creating those circle profile pictures :)
Here are the codes:
Javascript:
var img = document.createElement("IMG");
img.setAttribute("src", "img_pulpit.jpg");
img.setAttribute("width", "300");
img.setAttribute("height", "300");
img.setAttribute("alt", "The Pulpit Rock");
document.body.appendChild(img);
HTML:
<div id="IMG">
<script src="Script.js"></script>
<link rel="stylesheet" type="text/css" href="Style.css">
[1]: https://i.stack.imgur.com/zXm4N.png
CSS:
img {
background: #2f293d;
border: 1px solid #2f293d;
padding: 6px;
border-radius: 50%;
box-shadow: .6rem .5rem 1rem rgba(0, 0, 0, .5);
}
Any Solution will be greatly appreciated.