Thursday, 6 July 2017

jquery - Short down text, but leave the filetype visible



How can I make this possible?



From this-is-a-very-long-filename.jpg to this-is-a-very-lo [...] .jpg.



I have searched Google for several minutes now but I can't find any solution to this. Do you know how I can do this?



Thanks in advance!



Answer



You don't really need jQuery for this, you can use classic javascript:





No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...