Forum: Rails Spinoffs (closed, excessive spam) Problems with toggle helper (blind)

3d7dcef6ed0355988eddbf1126542eb6?d=identicon&s=25 Sander (Guest)
on 2008-06-14 23:07
(Received via mailing list)
Hello people,
Today I first tried out Scriptaculous. And I think it’s great.
But after a few hours of struggling with the effects, I am getting
stuck at this point. Which point?

Well, I made a simple html file, with two <div>’s next to each other.
In the left one, I made a link to make the right <div>-element blind
using the Effect.toggle helper. (I’ve got a lot of problems with the
slide effect (within the toggle helper), it just doesn’t do
anything!)

This all works (but only, like I said, using the blind (or appear)
effect), but unfortunately when I click the toggle button once again
to make it come back, it doesn’t slide, it just comes back in a flash
(with delay though).
I made a simple example file, so you can see my problem.

One important note might be that I am using these options (for the
blind effect):  scaleX: true, scaleY: false. Which, as you can see,
make the effect horizontal instead of vertical. The example file can
be seen from this link:
http://tinyurl.com/5t6mxm

Hope that somebody knows a solution for this.

Regards,

Sander.
99108829176dfbbc5d0bf3c041542a26?d=identicon&s=25 FernandezPablo (Guest)
on 2008-06-15 16:18
(Received via mailing list)
I really dont know if this is the problem, but note that the contents
that you're trying to hide must themselves be inside a div tag.

so where you put

<div id="right">Close this, please?!</div>

it must be

<div id="right">
  <div>Close this, please?!</div>
</div>

here's an example
http://github.com/madrobby/scriptaculous/wikis/effect-toggle
(check the notes part)

Regards,

Pablo
3d7dcef6ed0355988eddbf1126542eb6?d=identicon&s=25 Sander (Guest)
on 2008-06-15 16:55
(Received via mailing list)
I changed it, but it didn't have effect.

I also added a 1px border to the div tag and now when you open the
element you can that the heigth is 0px.

So there must be the problem, the height doesn't work properly.


Any ideas?


Regards,

Sander.
This topic is locked and can not be replied to.