|
Scaling question: msg#00127lang.ruby.rails.spinoffs
I created a simle script for a webpage I'm working on that updates a small div of text every so often. The text varies greatly in length, so I would rather use an effect so the div collapses->the text is updated-> the div uncollapses. My code below, however, doesn't work. After testing, I realize that it isn't scaling to 100% of the text height, but 100% of another value. What would be the best way to fix this? My code: var offset = 0; function fadeIn(r) { $("currentaside").innerHTML = r.responseText; new Effect.Scale("currentaside", 100.0, {scaleX: false, scaleFrom: 50, scaleContent: false}); } function getData() { new Ajax.Request("./aside.php?fromcat=2&offset=" + offset, {onComplete: fadeIn}); } function refresh() { offset++; new Effect.Scale("currentaside", 50, {scaleX: false, afterFinish: getData, scaleFrom: 100, scaleContent: false}); } getData(); new PeriodicalExecuter (refresh, 10); |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Changing loadTextURL: 00127, Jon Tirsen |
|---|---|
| Next by Date: | Extended $ function called $$: 00127, Sunny |
| Previous by Thread: | Drop Area BUGi: 00127, James Peters |
| Next by Thread: | Extended $ function called $$: 00127, Sunny |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |