Trying to create a loading bar that gets slower and slower. I've made it so each bit of added width gets incrementally smaller, but now I want to do the same to the interval value. As of right now, my variable "itime" is set at 1000 and doesn't slow down with each step. What am I doing wrong?
var itime = 1000;
var progress = setInterval(function(){
var insidewidth = $('#inside').width();
if (insidewidth > 388) {
$("body").css("background","blue");
clearInterval(progress);
}
else {
$("#inside").width($("#inside").width() + (175/insidewidth) );
itime += 1000;
};
}, itime);