https://jsfiddle.net/mvuy7q60/

Using JavaScript (and jQuery). How can I assure that there's only one line shown (instead of entire content of item), and if it's longer than one line, end first line on "..."?

Something like this: https://jsfiddle.net/tt9psxz3/

Something like this should do the trick ...

div {
    text-overflow: ellipsis;
    overflow-x: hidden;
    white-space: nowrap;
}
commented: That escalated quickly. +4
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.