i need help with my countdown timer. i have a unix timestamp that i want to countdown from in minutes. it should just print out "X minutes left." in my span. i dont know why it isn't working. i placed the jquery above it, so jquery is in use.
HTML:
<span id="time-left">x</span>
JS:
<script type="text/javascript">
$(document).ready(function() {
setTimeout(function(){
var endTime = 1450992799399;
var curTime = Math.floor((new Date()).getTime() / 1000);
var seconds = endTime - curTime;
var minutes = Math.floor(seconds / 60);
seconds %= 60;
$('#time-left').html() = minutes + " minutes left.";
}, 1000);
});
And I want it to update every second. But right now it isn't doing anything. The text remains as "x" in my span.