Pregunta

En un evento mouseenter / mouseleave, me gustaría capturar la posición absoluta 'superior' de la celda de una tabla.

Hasta ahora, el evento se adjunta así:

$('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
});
¿Fue útil?

Solución

$(this).offset().top
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top