As mentioned, there are a few issues with your code:
- You are setting the offset of an element which isn't loaded in the DOM yet, so setting an offset at this stage would not have any effect. Best solution is to set it in the
onAfterRendering
event of the view. - According to the jQuery API, the coordinates of the
offset()
method only accepts numbers (10, 20, etc) whereas you have provided a CSS unit ('100px' etc)
See this working jsbin example http://jsbin.com/jafuk/1/edit where the offset is set in the onAfterRendering
event.
And since you have asked about animation in another topic, I have added that as a bonus. I'll leave it as an exercise on how to detach a control/image from one MatrixLayout(Cell) to another :-)