But this is what I don't understand... this is how I'm seeing it:
The block value is created by the equation from the x/y co-ords, right? Which are constantly changing through every mouse movement over the image, but they are rounded to a sequence of 1, 6, 11, 16, 21 etc since my blocks are 5*5.
So I'm hovering over, lets say block 5 (x:21, y 1). If I store that number, one I'm not sure where I actually store it too (again, sorry if this is obvious - I'd normally store data on a server/cookie/session etc but for this it's seems unnecessary).
Say if I did know how to store, it's then stored - then I check that block value with the old block one (and I take it I make it so if an old value doesn't exist, then to still execute the AJAX).
But when the AJAX is called and the block number is stored again, the block number still hasn't actually changed, so both values of the block will forever be the same. Since the mouse hasn't moved yet and they are taken from the same x/y co-ords?
And if I do move the mouse and the original block value changes, so will the new one, once again, making them both them same surely!?
So both block value and stored block value will constantly be updating as the mouse moves around, completely making the loop pointless?
I'm not trying to be awkward, and trust me, I am trying so hard to understand this but nothing is clicking :/
EDIT: Thank you for simplifying the block equation too