Multiple JS effects on one event

Posted by Cylindric on Stack Overflow See other posts from Stack Overflow or by Cylindric
Published on 2010-04-10T17:18:34Z Indexed on 2010/04/10 17:23 UTC
Read the original article Hit count: 329

Filed under:
|

I've got a bunch of Ajax links in a menu that reload a div called #ajaxupdatediv. I want to display another div while that's loading the new content, so how would I fire off both effects?

<div id="#ajaxupdatediv">
    Content will go here
</div>
<div id="ajaxloadingdiv">
    ...Loading...
</div>

Here's a bit of the PHP

array(
    'update' => '#ajaxupdatediv',
    'before' => $this->Js->get('#ajaxupdatediv')->effect('fadeOut'),
    'complete' => $this->Js->get('#ajaxupdatediv')->effect('fadeIn'),
)

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about jQuery