I have a lit of offsets for a div that I load when a link is clicked to give a comic book style effect. Each offset activates other animations to give a more dynamic feel.
If you utiilise the .data('obj',{currentPosition:index});
approach, you can create a .data()
object on an element and have your animations query it to see 'where' they are from 0 to however many items you need in your comic book sequence. Base your animations on the index from 0=>however many and then update the currentPosition
when your animation is finished using the callback parameter in the animation.
Would that direction help? If you can give some example code (simple or otherwise) we might be able to see a way to tie it in?