With jQuery hover how do you check if you’ve just hovered on the same element again? Say I have two boxes and hover on box 1, then left, then come back and hover on that same box. I’d like to store the value of the initial hovered element (box 1) and then compare if it’s the same when hovering back.
Thanks!!
Try something like below,
Note: I have used 2 functions assuming that box1 hover and box2 hover has totally different functionalities… If not you can have it inside same function and use
this.idto group them.. see below.