I’m trying to trim and shorten some HTML. I use this code:
$(window).bind("load", function() {
$.trim('a').substring(0, 10).split(" ").slice(0, - 1).join(" ") + "...";
});
It doesn’t work. I tried many things but I can’t seem to make it work… Take a look at the example: JsFiddle
I think you meant something like:
alternatively: