Can anyone tell me how to use Effect.toggle()
to toggle to left and right instead of up and down? Or is there any other effect in Scriptaculous that does this ?
Asked
Active
Viewed 367 times
0

Geek Num 88
- 5,264
- 2
- 22
- 35

Crays
- 2,458
- 9
- 27
- 31
1 Answers
1
Unfortunately the toggle()
method only supports 3 effects appear, slide, and blind - if you want to do left to right I would suggest using the morph()
method as you can put any styles in there and they will be changed back and forth
for example
// close the div horizontally
$('firstdiv').morph('width:0px;');
//open the div horizontally
$('firstdiv').morph('width:auto;');

Geek Num 88
- 5,264
- 2
- 22
- 35
-
Thanks but not what i was looking for :( Guess there really is no other way. – Crays Mar 10 '13 at 11:33