I just started making a basic game in HTML, CSS, Javascript, and JQuery, but I want to have the money add up after a certain amount of time (if you have ever played an idle game, you'd know what i mean) but i cant figure this out.
If anyone could help me out, i would appreciate that.
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='style.css' />
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script src='http://code.jquery.com/jquery-latest.js'></script>
<script src='script.js'></script>
</head>
<body>
<div class='Main'>
<div class='CUR'>
<p id='CUR1'>Copper Coins: <span id='GC'>0</span></p>
</div>
</div>
</body>
<script>
var max = 100;
var copper = 0;
while(copper <= max) {
setInterval(1000);
document.getElementById('GC').innerHTML = copper;
copper++;
};
</script>
</html>