A very much simple js code to add ellipsis with text