Something like this (untested) code:

<div id="myElement">old content</div>
<a href="#" id="myLink">Link text...</a>

<script type="text/javascript">

$('myLink').observe('click', function(event) {
        Event.stop(event);
        $('myElement').visualEffect('fade', {
                afterFinish: function() {
                        new Ajax.Updater('myElement', 'content.html', {
                                onSuccess: function(response) {
                                        $('myElement').visualEffect('appear');
                                }
                        })
                }
        });
});

</script>

You'll probably want to refactor it but it should at least give you a hint.

On 11/21/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> what I am trying to do is when a link is clicked using script.aculo.us
> and prototype to Effect.Fade out a seperate div, load new content with
> Ajax.Updater, then Effect.Appear the new content in the div. Im lost on
> how to do this is there isnt much documentation on protoype and
> script.aculo.us so do you guys have any suggestions?
>
>
> >
>


-- 
burnfield.com/martin

--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to