Monday, September 29, 2008

Effect.Fade and Effect.Appear

This is my ajax link that I am using:

echo $ajax->link($html->image('/img/portfolio/small/' .
$portfolio['Portfolio']['picture'], array('alt' =>
$portfolio['Portfolio']['title'])), '/portfolios/view/' .
$portfolio['Portfolio']['id'], array('update'=> 'case_study',
'complete' => 'Effect.Appear(\'case_study\', {duration: 2.0})'), null,
false);

Long I know. I can explain it more if you want me to, but the main
part here that is my focus is this part:

array('update'=> 'case_study', 'complete' =>
'Effect.Appear(\'case_study\', {duration: 2.0})')

Now all of this works as it is. However what I wanted was that after
the case_study div initially "appeared" was once another link was
clicked I wanted it to fade away and have it re-appear when it was
complete. So I thought I could add before the 'complete':

'before' => 'Effect.Fade(\'case_study\')
or
'loading' => Effect.Fade(\'case_study\')

Neither of these are working. What happens as soon as I add either of
those, is the div vaguely appears and then suddenly disappears, never
to appear again until another link appears and then it just continues
that cycle.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: