Here's a Vanilla JavaScript solution:
(function init() {_x000D_
_x000D_
var cells = document.getElementsByClassName("cell");_x000D_
_x000D_
for(let index = 0; index < cells.length; ++index) {_x000D_
let cell = cells.item(index);_x000D_
cell.addEventListener('mouseenter', setTitleIfNecessary, false);_x000D_
}_x000D_
_x000D_
function setTitleIfNecessary() {_x000D_
if(this.offsetWidth < this.scrollWidth) {_x000D_
this.setAttribute('title', this.innerHTML);_x000D_
}_x000D_
}_x000D_
_x000D_
})();
_x000D_
.cell {_x000D_
white-space: nowrap;_x000D_
overflow: hidden;_x000D_
text-overflow: ellipsis;_x000D_
border: 1px;_x000D_
border-style: solid;_x000D_
width: 120px; _x000D_
}
_x000D_
<div class="cell">hello world!</div>_x000D_
<div class="cell">hello mars! kind regards, world</div>
_x000D_