Adding this after the element.update() seems to work.
//Stolen directly from the effects.js class.
var elementDimensions = $("searchResults").getDimensions();
e.options.scaleMode.originalHeight = elementDimensions.height;
e.options.scaleMode.originalWidth = elementDimensions.width;
On Mar 26, 1:59 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> There appears to be an issue with the Core Effects beforeStart
> callback. If data is written to the object that is being rolled down
> on the beforeStart callback the scrolling effect fails to happen. The
> div will be displayed but not until the effect finishes. Anyone found
> a workaround to this issue?
>
> The following code will demonstrate the issue:
>
> <div id="searchResults" style="display: none;"></div>
> <script>
> new Effect.BlindDown($("searchResults"), {
> beforeStart: function() {
> $
> ("searchResults").update("test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>");
> },
> afterFinish: function() {
> //alert("done");
> }});
>
> </script>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---