javascript - Making a hover over pop up display in angularjs -


<img class="line" src="line_draft.png" height="5px" width="50px">  <div ng-mouseover="infoisvisible = true" ng-mouseleave="infoisvisible = false" ng-init="infoisvisible = false"  onmousemove="getcoords(event)">     <img class="icon" ng-src="{{ info.icon }}" height="20px" width="20px">  </div>     <div class="info">     <p ng-show="infoisvisible">{{ info.description }}</p> </div>   <style>      .line {         margin-bottom: 7px;         box-shadow: 0 0 0 2px rgba(0,0,0,.05);     }      div {         display: inline;     }      .info p {         background-color: red;         position: fixed;         z-index: 100;     }  </style>  <script type = "text/javascript">      function getcoords(event) {         var x = event.clientx + "px";         var y = event.clienty + "px";         var infoclass = document.getelementbyid("info");         infoclass.style.left = x;         infoclass.style.top = y;     }  </script> 

this directive file in angular. error coming when try , hover on .icon error function getcoords() undefined. also, smart way display hover on pop box?

thank you!!


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -