0

I'm using this dependencies

  • jquery-ui-1.8.18.custom.min.js (custom but with all jqueryui component)
  • jquery-1.7.1.min.js
  • spinejs 1.0.6

I'm developing small spinejs application with jqueryui. I have really basic spine.controller

http://pastie.org/3798705

I try use some jqueryui effects in show method. According to this documentation this should works http://jqueryui.com/demos/show/.

@sidebar.el.show('slow')
//or
@sidebar.el.show('bounce',{ percent: 100 },2000);
//or
@sidebar.el.show('explode',{to: { width: 280, height: 185 }},2000);

Unfortunately I can't see any animation effect but callback after finishing animation works just fine. Also if I set animation speed to very high number like 5000 I can see delay and after it html element shows and fire callback (finish animation)

ps: fadeIn() function works as I expect

ps2: I delete all my css and only leave this

.sidebar
  background-color: red;
  width: 300px;
  height: 300px;
Lewy
  • 729
  • 7
  • 18

1 Answers1

1

This is probably because the parent "stack" of the element you're trying to animate is still hidden when you start the animation.

It would make more sense to call a render() function from the controller's constructor that handles appending the element to the stack. You can see some examples of how to do this here: http://spinejs.com/docs/controller_patterns

fholgado
  • 390
  • 2
  • 10