JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://dotdotdot.frebsite.nl/js/jquery.dotdotdot-1.2.1.js"></script>
Fail:
<div class="wrapper">Thisisalongstringoftext Also</div>

But this works:
<div class="wrapper">Also Thisisalongstringoftext</div>

CSS

div {
    width: 100px;
    height: 20px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
}

JavaScript

$(document).ready(function() {
    $(".wrapper").dotdotdot({wrap:'letter',fallbackToLetter:true}); // This runs on all elements
})