var trunc='Take inspiration from these five celebs, who prove that dressing for Fall can still by stylish by ways of cozy layers and over-the-knee boots.'; function getLeadingHtml (input, maxChars) { var token = /\w+|[^\w<]|<(\/)?(\w+)[^>]*(\/)?>|"; return output; }; trunc = getLeadingHtml(trunc,47) trunc=(trunc+'...'); document.write('
');