If you're looking for a straightforward way to incorporate animations into your pagination items, consider creating a block component using an animation library such as velocity. Simply wrap this component around your pagination items and provide a jQuery selector that targets each individual item. Then, initialize the animation plugin using the selector. You can set up an .observes('content')
to ensure the component rerenders when the content changes. Here's a basic example:
App.MyAnimationComponent = Ember.Component.extend({
didInsertElement: function () {
var selector = this.get('selector');
this.$(selector).animateLibrary({ options: 'foo' });
},
fireOnNewContent: function() {
this.rerender();
}.observes('content')
});
To use this component, follow this structure:
{{#my-animation selector='.item'}}
{{#each items}}
<div class="item">{{foo}}</div>
{{/each}}
{{/my-animation}}