dom - Determine which element the mouse pointer is on top of in Javascript -
i want function tells me element mouse cursor over.
so, example, if user's mouse on textarea (with id wmd-input
), calling window.which_element_is_the_mouse_on()
functionally equivalent $("#wmd-input")
demo
there's cool function called document.elementfrompoint
sounds like.
what need find x , y coords of mouse , call using values:
var x = event.clientx, y = event.clienty, elementmouseisover = document.elementfrompoint(x, y);
Comments
Post a Comment