[Javascript] What was last rollover?
Roger Roelofs
rer at datacompusa.com
Thu Oct 4 13:31:37 CDT 2007
Tedd,
On Oct 4, 2007, at 2:07 PM, tedd wrote:
> I have three images on a web page with a css rollover condition,
> such as:
>
> img1:hover ------8<-----
>
> If the user moves his/her cursor over an image, then the border's
> corresponding color changes -- no problems there.
>
> But, how can I determine which image was subject to the *last*
> rollover?
I don't think this info is stored anywhere. You can fake it with
var lastHover
<img ... onmouseover="lastHover = this;">
in jQuery land it would be as easy as this...
$("#img1, #img2, #img3).bind("mouseover", function() { lastHover =
this; });
Roger
--
Roger Roelofs web www.datacompusa.com
Datacomp Appraisal Services Email rer at datacompusa.com
3215 Eaglecrest Drive, NE
Grand Rapids, MI 49525-4593
More information about the Javascript
mailing list