0
0
Fork 0
mirror of https://github.com/ENSL/ensl.org.git synced 2025-02-27 22:31:26 +00:00
ensl.org/app/views/shoutmsgs/create.js.erb

9 lines
462 B
Text
Raw Normal View History

<% if @shoutmsg.domain == "shoutbox" %>
$("div#shoutbox").prepend("<%= escape_javascript(render("shoutmsg", :shoutmsg => @shoutmsg)) %>");
$("form#new_shoutbox")[0].reset();
<% else %>
$("div#<%= @shoutmsg.domain %>").append("<%= escape_javascript(render("shoutmsg", :shoutmsg => @shoutmsg)) %>");
$("div#<%= @shoutmsg.domain %>").scrollTop($("div#<%= @shoutmsg.domain %>")[0].scrollHeight);
$("form#new_<%= @shoutmsg.domain %>")[0].reset();
<% end %>