Forum: Ruby on Rails RJS on page load

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
0de83fd56f1af530034ba8efa5490b1b?d=identicon&s=25 John Butler (johnnybutler7)
on 2006-12-29 12:19

How can i call some RJS as soon as the page loads.  For example i want
to create a news ticker with the latest news items so it waits x amount
of seconds before replacing the news item with the next in the
collection.  See Below:

<% for article in @articles %>
    <div id="latest_article">
    <% i want call my rjs somewhere in here passing next article in
collection  %>
<% end  %>

  page.replace 'latest_article', :partial => 'article', :object =>

Is this even possible or am i going about this the wrong way?

This topic is locked and can not be replied to.