In a particular application I recently built I used smth like this
(merged with Mical's code)

http://pastie.org/305264


On 10/31/08, Michal <[EMAIL PROTECTED]> wrote:
>
>  Hey,
>
>  I think there are two ways you can go about this. Using a Fx.Tween
>  instance, you can inject the new content using chains or using
>  onComplete. I would probably use a chain, something like:
>
>  http://pastie.org/305178
>
>  should work. However, you maybe should create only one Fx.Tween
>  instance on domready, and then call its start (and the chain) when you
>  want to change the content.
>
>  Hope this helps,
>
>
>  Michal.
>
>
>  On Oct 31, 4:36 pm, janus <[EMAIL PROTECTED]> wrote:
>  > I'm brand new to mootools and was wondering if anyone can help with a
>  > simple function to fade the current content out and then fade in new
>  > content.
>  >
>  > 1)fade out current content
>  > 2)get newcontent
>  > 3)fade in newcontent
>  >
>  > I had prevoiusly build this in jquery but would like to move to
>  > mootools. here is the current code of the function in Jquery:-
>  >
>  > function newcontent(newcontent)
>  > {
>  >         $(divname).fadeOut("fast",function(){
>  >                 $(this).html(newcontent);
>  >                 $(this).fadeIn(1500);
>  >                         })}
>  >
>  > this function accepts a variable from another function (newcontent),
>  > fades out the current page content and then fades in the new content.
>  >
>  > in mootools  to just display the content use:-
>  >
>  > $(divname).set('html', newcontent);
>  >
>  > and this works fine, but i would like to add the fade effects again. I
>  > think this has something to do with chains but I not sure how to go
>  > about implementing this.
>  >
>  > if anyone could point me in the right direction, that would be great
>  >
>  > cheers
>  >
>  > Janus


-- 
◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦
Ivanicus' Code Box
http://ivanicus.com/

Reply via email to