Refactor timeline js and css position