I am using Jquery to animate an object while the user presses a key.
Upon Keyup the object stops moving, but I need to know what the background position of the object is when it stops. Using .stop(true);
Without getting to much into it, I need to be able to get the position of the background. Is there anyway with Javascript or jquery to obtain those numbers?
If you are changing the background position coordinates, you will be able to get the computed style of the element, at the moment you stop the animation simply by using the
cssmethod.It will return you a pair of pixel values separated by a space, something like “Xpx Ypx”, you can split that values and use them separately: