Hello i want to use counter which takes value from js file, but i want to change it.
Here is js code;
function countUp(count)
{
var div_by = 100,
speed = Math.round(count / div_by),
$display = $('.count'),
run_count = 1,
int_speed = 24;
var int = setInterval(function() {
if(run_count < div_by){
$display.text(speed * run_count);
run_count++;
} else if(parseInt($display.text()) < count) {
var curr_count = parseInt($display.text()) + 1;
$display.text(curr_count);
} else {
clearInterval(int);
}
}, int_speed);
}
countUp(600);
It counts to 600 but i want assign variable to this from database probly with codebehind.
Here is html code ;
<div class="col-lg-3 col-sm-6">
<section class="panel">
<div class="symbol red">
<i class=" fa fa-times text-muted"></i>
</div>
<div class="value">
<h1 class="count">123123123</h1>
<p>Position Canceled</p>
</div>
</section>
</div>
How can i change countUp value in js. Please help me. Thank You