A Pen by Jason Livesay on CodePen.
Created
February 7, 2019 07:53
-
-
Save runvnc/f5fc29aa5de803699b8b2c5f8ac53351 to your computer and use it in GitHub Desktop.
daZjRb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="cell"> | |
<div class="name"><span style="vertical-align:middle">JOBS IN QUEUE</span></div> | |
<div class="biginfo">784</div> | |
</div> | |
<ul><li><a href="" data-id="1001" class="job">Job #1001</a></li> | |
<li><a href="" data-id="1002" class="job">Job #1002</a></li></ul> | |
<div id="details"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function selJob(e) { | |
let id = this.getAttribute("data-id"); | |
document.getElementById('details').innerHTML = 'Job #'+id+' details go here.'; | |
e.preventDefault(); | |
}; | |
let jobs = document.getElementsByClassName("job"); | |
for (let i=0; i<jobs.length; i++) { | |
jobs[i].addEventListener('click', selJob, false); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div { | |
font-family: sans-serif; | |
vertical-align: top; | |
} | |
.cell { | |
background-color: #383838; | |
width: 200px; | |
height: 200px; | |
border: solid 7px black; | |
} | |
.name { | |
background-color: #232323; | |
color: white; | |
height: 35px; | |
font-weight: bold; | |
font-size: 12px; | |
padding-top: 15px; | |
padding-bottom: 5px; | |
padding-left: 15px; | |
line-height: 30px; | |
} | |
.name::before { | |
content: "•"; | |
color: lightgreen; | |
font-size: 30px; | |
vertical-align: middle; | |
padding-right: 10px; | |
} | |
.dot { | |
color: lightgreen; | |
font-size: 30px; | |
line-height: 12px; | |
margin-top: 10px; | |
} | |
.biginfo { | |
font-size: 52px; | |
color: white; | |
font-weight: bold; | |
padding-left: 30px; | |
padding-top: 35px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment