JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://raw.githubusercontent.com/BeSite/jQuery.dotdotdot/v1.7.3/src/js/jquery.dotdotdot.min.js"></script>
<div id="wrapper">筋肉のブレを抑え、さらなるパフォーマンスをサポート独自の段階着圧により効果的に筋肉のブレを抑える高機能ソックス</div>
<div id="wrapper">This is a long string of test</div>

<div class="wrapper">This is a long string of test</div>
<div class="wrapper">This is a long string of test</div>

CSS

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

JavaScript

$(document).ready(function() {
    $("#wrapper").dotdotdot(); // This only runs on the first element
    $(".wrapper").dotdotdot(); // This runs on all elements
})