0

How to identify Ellipsis is being applied so that some links(more) can be suffixed to toggle the ellipsis.

Is there any was to detect the ellipsis is being applied using CSS or Javascript. Here i need to apply the ellipsis after three lines. The CSS below:

    .test-ellipsis {
        color: #6f6f6f;
        font-size: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
Sareesh
  • 85
  • 1
  • 9

1 Answers1

-1

You could implement this using jQuery. The idea is to clone and render the element and see if the rendered width is greater than the original. But instead of giving you a working code, I will just redirect you to another similar SO question that implements a working version.

Community
  • 1
  • 1
user3856210
  • 270
  • 2
  • 12