Pure javascript implementation, css as animations