remove css3 pesudo code and replaced with pure js