Vertical Progress Bar
by chickensoup64
HTML
<div class="skill">
<button>Show value</button>
<div class="outer">
<div class="inner" data-progress="57%">
<div></div>
</div>
</div>
</div>
<div class="skill">
<button>Show value</button>
<div class="outer">
<div class="inner" data-progress="92%">
<div></div>
</div>
</div>
</div>
CSS
.outer {
width: 30px;
height: 140px;
border: 2px solid #ccc;
overflow: hidden;
position: relative;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
}
.inner, .inner div {
width: 100%;
overflow: hidden;
left: -2px;
position: absolute;
}
.inner {
border: 2px solid #999;
border-top-width: 0;
background-color: #999;
bottom: 0;
height: 0%;
}
.inner div {
border: 2px solid orange;
border-bottom-width: 0;
background-color: orange;
top: 0;
width: 100%;
height: 5px;
}
JavaScript
$('.skill').on('click', 'button', function(){
var skillBar = $(this).siblings().find('.inner');
var skillVal = skillBar.attr("data-progress");
$(skillBar).animate({
height: skillVal
}, 1500);
});