1. sugasaki

    Posted

    sugasaki
Changes in title
+Angular マウスホバー時に、カーソル座標を得る
Changes in tags
Changes in body
Source | HTML | Preview
@@ -0,0 +1,19 @@
+
+
+
+```js
+ var appEl = angular.element(document.getElementById($scope.spanID));
+ appEl.hover(function (e) {
+ var $page = angular.element(window)
+ var windowScrollTop = $page[0].pageYOffset
+ var windowScrollLeft = $page[0].pageXOffset
+ var elScrollTop = appEl.offset().top
+ var elScrollLeft = appEl.offset().left
+
+ //show ooui on mouseover event
+ var top = windowScrollTop + elScrollTop;
+ var left = windowScrollLeft + elScrollLeft-20;
+},);
+
+```
+