How to run an animaiton once template DOM is ready?


#1

I want to run an animation on a template block, within the onRendered function, after the DOM for the template is ready - how best to do this?


#2

which type of animation you want to run?
give more idea of your problem


#3

Fade In when the template is rendered, Slide Up when the template is removed from DOM.


#4

In template consider one div give class <div class="fadein">.....</div>
Template.templatename.onRendered(function (){ $(.fadein)..fadeIn() });
And Template.templatename.onDestroyed(function (){ $(.fadein).slideUp() })

Please add meteor add jquery


#5

ok, no need for UI Hooks then?


#6

I believe onDestroyed fires after the DOM is already done?

There are several GitHub issues about this. Here is one