jQuery trigger mouseover function when page loads with the mouse over the element
Posted
by Gal V
on Stack Overflow
See other posts from Stack Overflow
or by Gal V
Published on 2010-05-25T08:27:17Z
Indexed on
2010/05/25
8:31 UTC
Read the original article
Hit count: 509
Hello all,
I have an ASP.NET document, with an Image element within it.
I created a mouseover function on this image element and it's working fine.
The question is:
If the mouse is ALREADY over the element when the document loads itself, the mouseover function doesn't trigger (I need to mouseout and then mouseover again in order to trigger it).
Is there any way to check in the $(document).ready function if the mouse is already on top of this element? and if yes- trigger the mouseover function.
Thanks all!
© Stack Overflow or respective owner