Scale values are in percentage.  If you need to store a specific (hidden) height for each, then calculate what that percentage is.  To get the effect you asked for, however, doesn't require that sort of precision.

It's a bit disingenuous to say "I'm familiar with both libraries", then suggest he didn't answer your question, when in fact he did.  Any more work on his part, and he's actually building it for you, something I'm sure he's not paid enough for.  That said, the following snippet accomplishes the effect:


<style type="text/css">
li {
overflow: hidden;
height: 30px;
}
#li1 {background-color: #bdb;}
</style>
<script type="text/_javascript_" src=""></script>
<script type="text/_javascript_" src=""></script>
<script type="text/_javascript_">
function toggle () {
if (this.up) {
this.up = false;
Effect.BlindUp(this, {scaleTo:20, scaleFrom: 100, restoreAfterFinish: false, afterFinishInternal: function(){} });
} else {
this.up = true;
Effect.BlindDown(this, {scaleFrom: 100, scaleTo:500,  restoreAfterFinish: false, afterFinishInternal: function(){} } );
}
}

window. () {
var listItem = $("li1");
listItem.>
}
</script>

You may also wish to take a look at the accordion effect done w/ Scriptaculous at http://wiki.script.aculo.us/scriptaculous/show/accordion+feature

Documentation for Effect.BlindDown is at http://wiki.script.aculo.us/scriptaculous/show/Effect.BlindDown, although it did require looking at the source to get all of the options.


TAG

On May 20, 2006, at 6:18 PM, Danial Tzadeh wrote:

Jeremy,

Thank you for your advice. I am already familiar with both libraries. However, the part I am looking for is that first it is at special height (say 100) and then it goes to full height upon click and back. Also it renders all the LI and you don't need to address all one by one.

Danial

On 5/20/06, Jeremy Kitchen <[EMAIL PROTECTED]> wrote:
On Saturday 20 May 2006 03:29, Danial Taherzadeh wrote:
> Hi Everybody,
>
> I was wondering if there is such a work done with Scriptaculous/Prototype
> before and if not how to achieve it?

look at Effect.BlindDown and Effect.BlindUp in scriptaculous.

-Jeremy


_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs




_______________________________________________
Rails-spinoffs mailing list

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to