logo       

[Rails] Triggering Javascript after AJAX: msg#03326

RubyonRailsTalk

Subject: [Rails] Triggering Javascript after AJAX


I have a page starting out with:

<div id="ajaxTarget">
</div>

After an AJAX call, the innerhtml is updated to:

<div id="ajaxTarget">
<div id="newDiv" />
<div>

where after the new content is loaded, I want to run

$('newDiv').fade({ duration: 2.0, from: 1, to: 0 });

I can't figure out how to set this up. Code examples or links to
documentation would be nice... :)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise