Dotdotdot library removing text

196 views Asked by At

Dotdotdot library removing my text on newer versions of Chrome Browser using jquery dotdotdot version 1.6.10 and have try later versions as well. It flashes on initial page load then disappears. I know I can do this with CSS but working a big site with lots of these instances.

$(function() {
    $('[data-ellipsis]').dotdotdot({
            ellipsis    : ' ...',
            height      : null,
            watch       : true
    });
});

<div class="summary" data-ellipsis style="overflow-wrap: break-word;">
   <p>??</p>
</div>
1

There are 1 answers

0
roshambo On BEST ANSWER

Figured out the issue. I upgraded the dotdotdot plugin to version 2.0.1 https://cdnjs.com/libraries/jQuery.dotdotdot/2.0.1 and wrapped in an on load function.

$(document).on("load", function() {
     $("[data-ellipsis]").dotdotdot({
         ellipsis: " ...",
         height: null,
         watch: true
     });
 }),