I want an object to move first left, then up, every time I call this action. It works fine the first time, but on second time, the object moves diagonally not in steps.
Currently I have this:
myObject.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function(){
myObject.css("left", 100);
myObject.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function(){
myObject.css("top", 50);
});
});
- Any other suggestions on how to achieve stepped animation?
- How do I unbind both of those "bindings" so it run like first time on every action?