0
0
Fork 0
mirror of https://github.com/ENSL/ensl.org.git synced 2025-01-20 08:21:04 +00:00
ensl.org/app/views/shoutmsgs/show.js.erb

9 lines
No EOL
464 B
Text

// TODO: fix domain
<% if @shoutmsgs.length > 0 %>
$('div#<%= @shoutmsgs.first.domain %>').scrollTop = $('div#shoutbox').scrollHeight
$("div#<%= @shoutmsgs.first.domain %>").html("<%= escape_javascript(render(:partial => "shoutmsgs/shoutmsg", :collection => @shoutmsgs)) %>");
<% if @shoutmsgs.first.domain != "shoutbox" %>
$("div#<%= @shoutmsgs.first.domain %>").scrollTop($("div#<%= @shoutmsgs.first.domain %>")[0].scrollHeight);
<% end %>
<% end %>