<div class='requirement_css' onmouseover="overShow(this,event)" onmouseout="outHide()"> <span class="m-l" ng-bind="item.name |cut:true:60:'...'">Task title</span> </div> <script> function overShow(obj, e) { var showDiv = document.getElementById('showDiv'); var theEvent = e ? e : window.event; showDiv.style.left = theEvent.clientX + document.body.scrollLeft - 5 + "px"; showDiv.style.top = theEvent.clientY + document.body.scrollTop - 50 + "px"; showDiv.style.display = 'block'; showDiv.innerHTML = obj.innerHTML; } function outHide() { var showDiv = document.getElementById('showDiv'); showDiv.style.display = 'none'; showDiv.innerHTML = ''; } </script> <div id="showDiv" style=" position:absolute; auto;height:40px;font-size:16px;background-color:#f1f4f5;display: none "></div> </accordion-heading>