الحصول على المطلق 'رأس' الموقف من الحدث الماوس (جافا سكريبت / مسج)
-
20-08-2019 - |
سؤال
وعلى mouseenter / الأحداث MouseLeave، أود أن القبض على 'رأس' موقف المطلق للخلية في الجدول.
وحتى الآن، ويرد هذا الحدث مثل ذلك:
$('td[someAttr]').mouseenter(function(mouse) {
// how do we get the td's top absolute position?
//FYI: mouse.pageX and mouse.pageY would give the mouse position
});
المحلول
$(this).offset().top
لا تنتمي إلى StackOverflow