The idea is to create a progress bar but with full stops ".". So in the div, a "." gets appended every 500ms, what i wanted to do is, if the length of the div (ie. number of ".") is bigger than 3, start removing one "." at a time, then when at 0, start the process again:

The way you're doing this is very inefficient because it touches multiple DOM-nodes on every change.
It will be more efficient to keep current progress value in a variable and update it with single
$('#load').html(...) call.