Calculate how much you could be making a day with Wolf-Points
# OF FOLLOWERS
YOU CAN MAKE
$0/day
function animateValue(id, start, end, duration) { // assumes integer values for start and end
var obj = document.getElementById(id); var range = end - start; // no timer shorter than 50ms (not really visible any way) var minTimer = 50; // calc step time to show all interediate values var stepTime = Math.abs(Math.floor(duration / range));
// never go below minTimer stepTime = Math.max(stepTime, minTimer);
// get current time and calculate desired end time var startTime = new Date().getTime(); var endTime = startTime + duration; var timer;
function run() { var now = new Date().getTime(); var remaining = Math.max((endTime - now) / duration, 0); var value = Math.round(end - (remaining * range)); obj.innerHTML = value; if (value == end) { clearInterval(timer); } }
timer = setInterval(run, stepTime); run(); }
function calculateB() {
followers = document.getElementById("followers").value; if(followers > 0) { followers = document.getElementById("followers").value; } else { followers = 0; } followersclean = parseFloat(followers.replace(/,/g, '')); //followers = document.getElementById("followers").value; cons = 0 + followersclean / 10; calc = 5 + cons + followersclean * 0.125; animateValue("money", 0, Math.round(calc), 1500); //document.getElementById("result").innerHTML = "$" + lol + '/day'; }
jQuery('#calculate').click(function(){ calculateB(); });