Hey. I have the following code working with my scriptaculous / prototype js files.
<a href="javascript:Effect.toggle('sec1','slide',{duration:2.0, scaleX:true, scaleY:false});">ONE</a>
<a href="javascript:Effect.toggle('sec2','slide',{duration:2.0, scaleX:true, scaleY:false});">TWO</a>
<a href="javascript:Effect.toggle('sec3','slide',{duration:2.0, scaleX:true, scaleY:false});">THREE</a>
<div style="overflow:hidden;height:100px;width:100px;position:fixed;">
<div id="sec1" style="height:100px;width:100px;background-color:#D5D5D5;float:left;position:relative;"> BLAH BLAH BLAH 1</div>
<div id="sec2" style="height:100px;width:100px; background-color:#ABABAB; float:left;position:relative;"> BLAH BLAH BLAH 2</div>
<div id="sec3" style="height:100px;width:100px; background-color:#030303;float:left;position:relative;"> BLAH BLAH BLAH 3</div>
</div>
But it keeps throwing an error “element.down() has no properties” effects.js line 728 anybody have any ideas as to how to fix it so that toggle / slide work left to right instead of up & down ??
http://jkirchartz.googlepages.com/scriptaculous_slidestrip.html here’s the page.
I’m testing using firefox & firebug.
in IE7 it gives me the ‘debug’ alert.
looks like your script source path is wrong,
js/prototype.js[FONT=monospace]
[/FONT]js/scriptaculous.js
it shouldn’t have the js/
unless you make a directory and put all your js there
I just realized that and fixed that issue, now it’s throwing the error I was seeing before.
Ok it seems that it just doesn’t accept “down” … are you sure this effect supports it?
check the documentation or do some googling to find out… if that function only supports left and right then you’re going to have to find another chunk of code to get it done
The effect is straight from scriptaculous, which relies on prototype, and works on all the website demo’s … check that link again. I think I got it working (and I’m not sure why it works now, I didn’t change much.)
Well from what I can tell you’re using a whole new function, which is not a “didn’t change much”
I get no errors, so I think you’re in the clear
Do you have all the scriptaculous effects files uploaded or available locally? Have you changed any of the paths from the scriptaculous demos?
I had a similar issue once I uploaded my files to the server because I didn’t realize that scripts such as behavior.js and effects.js were being used in addition to for instance slider.js
I also found that I needed to keep the directory structure I found in the scriptaculous demos. Some of my files were pathed to lib some to src.