js detect text overflow point code example
Example: determine text truncate javascript
/**
* Check if an element is truncated.
*/
function isTruncated(el) {
return el.scrollWidth > el.clientWidth
}
/**
* Check if an element is truncated.
*/
function isTruncated(el) {
return el.scrollWidth > el.clientWidth
}