Use setInterval instead of setTimeout Use setInterval instead of setTimeout check out codes: http://jsfiddle.net/GustvandeWal/295jqqqb/