[ 3 posts ]

Simon Gilligan

  • Username: sgilligan
  • Joined: Wed Jun 16, 2010 4:35 pm
  • Posts: 76
  • Location: Victoria, Australia
  • Offline
  • Profile
Tags:

How to turn off animation on render?

Post Posted: Sun Jun 05, 2011 1:20 am
+0-
I am looking to render my Accordion with all items in a collapsed state, without seeing the initial collapse animation take place.

Currently, I turn off useAnimation before I render my accordion (so I don't get the onRender collapse animations) and then turn on useAnimation after to get the animations back when interacting with the accordion. Am I going about this the right way? or is there a setting I've missed somewhere?

Iliyan Peychev

YUI Contributor

  • Username: peychevi
  • Joined: Tue Feb 24, 2009 12:38 pm
  • Posts: 136
  • Location: Varna, Bulgaria
  • Twitter: ipeychev
  • GitHub: ipeychev
  • Gists: ipeychev
  • Offline
  • Profile
Tags:

Re: How to turn off animation on render?

Post Posted: Sun Jun 05, 2011 4:34 am
+0-
sgilligan wrote:
I am looking to render my Accordion with all items in a collapsed state, without seeing the initial collapse animation take place.

Currently, I turn off useAnimation before I render my accordion (so I don't get the onRender collapse animations) and then turn on useAnimation after to get the animations back when interacting with the accordion. Am I going about this the right way? or is there a setting I've missed somewhere?


Yes, basically that is the situation right now.

In addition, you may try the following - set height of your div elements to 0px (hide them manually). Once Accordion get rendered, it will update them properly.

Iliyan

Simon Gilligan

  • Username: sgilligan
  • Joined: Wed Jun 16, 2010 4:35 pm
  • Posts: 76
  • Location: Victoria, Australia
  • Offline
  • Profile
Tags:

Re: How to turn off animation on render?

Post Posted: Sun Jun 05, 2011 3:41 pm
+0-
aha! your method is much cleaner. thanks Iliyan
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum