javascript identify span through text -id 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
}