I'm working on something exactly like (Your reaction?) in Buzzfeed
I don't know how they making this chart height average percentage?
I'm working on something exactly like (Your reaction?) in Buzzfeed
I don't know how they making this chart height average percentage?
I have done a solution: HTML:
var counts = $('.bar-container').find('.value').val();
var counter = counts;
var barHight = (90 * counts) / 122;
$(document).ready(function() {
$('.the-bar').css('height', barHight + 'px');
$('.mood-a').click(function() {
counter++;
$('.value').val(counter);
});
});
<div class="bar-container">
<a class="mood-a">
<span class="the-bar"></span>
<span class="react-icon">
<span>Peace <img src="images/ico-react-peace-w.png"></span>
</span>
</a>
<p><input class="value" type="text" value="64" disabled="disabled"></p>
</div>