I've got a for loop like this:
for (var i=first; i<=last; i++)
{
$("#markers").append("<div class='marker'>"+i+"</div>");
}
first is set to 2001 and last is 2010. This works fine. The problem is when I change it to:
for (var i=first; i<=last; i+=1)
{
$("#markers").append("<div class='marker'>"+i+"</div>");
}
(Notice the different final declaration is different). Any variation other than i++ results in an infinite loop. It's very strange as a jsFiddle with the same parameters works happily. Any suggestions?
i+=some_variable, I'd just simplified it down for the question.