I have an element that I have positioned using jqueryUI’s position.
I need to be able to animate this element by adjusting the offset (so that it remains relative to another element which is specified when initialising jQueryUI position.
I am positioning the element as shown:-
$('#toparrow').position ({
of: $('#relative_element'),
my: 'center top',
at: 'center top',
offset: "0 0"
})
And would like to aniate the offset to ‘0 -30’.
How can I achieve this?
Once it’s positioned, you can do a relative animation:
Due to the confusion of missing an = sign there, here’s a jsfiddle to illustrate:
http://jsfiddle.net/bryanjamesross/Vz4WV/